Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [physics]

Questions related to the application of Mathematica to problems in physics.

0
votes
0answers
32 views

Error caused by ThreeJSymbol

I do not understand what causes non-physical answer in my code although I have read about the error. I am also getting the following error, how could I fix the example error: "CompiledFunction::cfte:...
5
votes
1answer
173 views

How to represent $2n \times 2n$ Dirac matrices in terms of Pauli matrices in block matrix format?

I am interested in building matrices out of smaller matrices, do calculations, and express the results in a block matrix form, in terms of the smaller matrices. For example, say I define the ...
0
votes
1answer
52 views

Create an array of independent variables of variable size, all dependent upon the same dependent variable

I have an array of variables that I've constructed, that all depend on time s ...
0
votes
1answer
46 views

How can I calculate all of the points of my functional at once and export the results to a file?

I have the following functional, it depends of n, m and U, so I want to automatize the calculations for all the regimes and be able to export it in a way I can copy and the past the values easily. <...
0
votes
1answer
48 views

Add more than one condition to my equation

I have the following code to solve for a bunch of n, m e U, but I need different conditions for n=0 and m=n, already explicit in my code, but I don't know how to make it work. I know I have to make it ...
2
votes
2answers
311 views

Why do my attempts to fit Planck's law fail?

I have some data and want to fit it to Planck's law for black body radiation. The problem is that Mathematica does not give me the correct coefficients. When I evaluate ...
1
vote
1answer
111 views

Raising, lowering and number operators for Dirac notation

Starting from this very interesting post Defining quantum-mechanical Bra and Ket operations, i would like to implement raising, lowering and number operators, taking into account that they might be ...
0
votes
2answers
217 views

I want to visualize this 3D like DensityPlot3D (About Diffraction of light)

Here is a code modeling the diffraction of light. I made this because I want simulate the diffraction of light and visualize the light's density. It's Fresnel diffraction, and I want to see the ...
6
votes
4answers
363 views

Ball bouncing against a wall

A ball is thrown towards a vertical wall. The ball is initially located a distance xf from the wall, a height y0 above the ground, and is released with initial velocity v0 at an angle theta to the ...
11
votes
2answers
838 views

Two bouncing balls in 1 dimension, issues with two different methods?

I'm trying to simulate 2 balls with the same mass and diameter bouncing one on top of another under gravity, see the illustration below (not ideal, but this is the best result I've got so far, the ...
4
votes
1answer
113 views

A simple implementation of higher-spin calculus (explanation given)?

I'm a physicist studying higher-spin theory. In my research, we work with fully symmetric tensors using a notation which is implicit both in the dimension of space and the order of the tensor, i.e. an ...
2
votes
1answer
126 views

Showing trajectory of a dynamics on the unit ball

I have a unit ball and a vector with r0x, r0y and r0z ,the x,y,z components at initial time which evolves to r2x, r2y and r2z as function of time. I want to show the trajectory as in the attached ...
1
vote
0answers
96 views

Conformal field theory using Mathematica

Can someone suggest some open source mathematica packages to perform computations in conformal field theories e.g, OPE expansion, finding conformal blocks etc.
0
votes
0answers
119 views

Contracting tensors using diffgeo

I am trying to understand the way diffgeo does contractions, so I can get a result that makes sense. I am using the following example: $g_{ab}g_{cd}A^{abcd}$, where $g_{ab}$ is the metric and $A^{...
1
vote
1answer
81 views

Two Dimensional BVP

I am having a hard time in how someone could solve ${d^2V}/{d^2y^2}$+${d^2V}/{d^2x^2}$=0 with the following boundary conditions: V=0 when y=0, V=0 when y=a, V=$V_o$(y) when x=0, V->0 as x-> infinity ...
0
votes
1answer
134 views

Random placement of non-overlapping disks

I am trying to create a Monte Carlo simulation for a physical situation. The situation is a layer of disks are lying on a plane. The disks have a known mean radius and standard deviation, and a known ...
2
votes
1answer
197 views

Calculating with scientific notation

I want to calculate the gravitational force between the Earth and its Moon using Newton's gravitational formula: (G M1 M2)/d^2 and its appropriate physical units. I'd include the code I wrote for ...
8
votes
4answers
646 views

Setting Up Boundary Conditions for Magnetostatic PDE

Bug introduced in 11.2.0 and fixed in 11.3.0 The system is a hollow cylinder (thin solenoid) with a current density $\text{J}$ and I'm looking to solve the magnetic potential ($\text{A}$) inside the ...
0
votes
1answer
371 views

Dipoles on Mathematica [duplicate]

How would I plot a 2D field of a dipole but that has charge +q, and -q where they are on they y axis 4 units above and 4 units below the origin. and slice it along the xy plane? Any help on how you ...
0
votes
0answers
69 views

How to solve the eigenvalue problem that arises in stability of flows

I am an undergraduate student and I want to know how to solve this hydrodynamic stability problem. I tried but all my efforts have failed. Your suggestions will help me a lot. The equations are <...
7
votes
1answer
975 views

How can I reproduce a beautiful 3D vector plot?

I am a Mathematica V8 user. I found a very beautiful 3D vector plot on the Internet. I don't think it was created in Mathematica, but I'd like to reproduce it with Mathematica. How to do that? ...
2
votes
1answer
79 views

Unexpected/unphysical behavior of ODE near singularity

I'm trying to solve an ODE that becomes stiff or singular at a point. The ODE and initial conditions are $$\begin{align*} \frac{d^2 z}{dt^2} &= f(z) f'(z) \bigg(1-\frac{3 \eta^2}{2} f(z) \bigg)\\...
0
votes
1answer
163 views

Visualizing combined Vectors

I'm trying to visualize a cross-section of a finite continuous solenoid's B-Field (cylindrical coordinate equations from Wikipedia). I believe I have calculated the radial and z-axis fields, but I'm ...
2
votes
1answer
277 views

What are current approaches for supporting Dirac notation for quantum mechanics?

I'd like to be able to use Mathematica to preform some basic quantum mechanics and quantum computation operations using Dirac's Bra-Ket notation. I've seen several solutions to defining basic ...
2
votes
1answer
147 views

Star-mesh transformation in Mathematica

Are there possibly mathematica modules that perform the star-mesh transform, in the context of electrical circuit theory? Given a resistor network/graph as input. More context: We start off with a ...
4
votes
1answer
256 views

Lagrangian form of Earth-Sun Kepler blows up NDSolve?

I've looked at this 1-D SE question. That question seems to have difficulties around diverging potential functions, and I don't have that. I've looked at this 2-D 3-body demonstration, but that starts ...
0
votes
0answers
82 views

Integration involving vectors

Trying to integrate the following expression (where $\bf p$, ${\bf p3}$, ${\bf q3}$, ${\bf q}$ are vectors) $\int dq3 \int dp3 \int dq \frac{1}{\sqrt{\mu ^2+{\bf q3}^2} \sqrt{\mu ^2+({\bf p}-{\bf p3}-...
3
votes
1answer
199 views

Shell falling into a black hole in Kruskal coordinate

I am modeling the motion of a shell falling into a black hole in Kruskal coordinate with NDSolve. I am sure that the physics behind it is correct, but can't get the ...
4
votes
1answer
200 views

Pendulum, pulleys and friction

Considering the following physical situation: and writing the following code: ...
1
vote
1answer
150 views

How can I make and visualize a connected lattice structure with weighted bonds?

For a problem in condensed matter I am computing nearest-neighbor correlations (real numbers) between spins on a lattice. A good way to visualize this is by drawing a lattice structure with bonds ...
0
votes
0answers
105 views

Numerical integration of NDSolve solution

Linking to what is discussed here, writing the following code: ...
6
votes
1answer
283 views

Neumann Conditions on circle in 2D elastic deformation

I have the following problem: I am currently doing calculations with some physical background in research and need a short and sweet finite element simulation of a 2D deformation problem. Usually I ...
1
vote
1answer
421 views

Harmonic oscillator with damping attrition

Considering the following physical situation: and writing the following code: ...
1
vote
0answers
79 views

Evaluate the electrical resistance between any two points of a circuit

I have an electric circuit of which the structure is known but the value of the single components (all resistors) is not. I can measure experimentally the resistance between some points of my circuit. ...
3
votes
1answer
307 views

Solving a system of partial differential and algebraic equations? setting the step-size to get reasonable results

I'm trying to use Mathematica to get some early approximate solutions to a system of algebraic and partial differential equations. It is actually 1D model of an ideal gas in a tube. I'll divide my ...
10
votes
6answers
757 views

Is there concise code for the list operation I want to perform?

Is there any concise syntax for the following partitioning of a list. Given {1, 2, 3, 4}, I want to get the output as shown below. I have tried various function ...
0
votes
2answers
331 views

Solving a projectile trajectory problem [closed]

Hoping someone is able to help me with this problem. I will post the problem and what I am having issues with to allow you to better understand the problem. So I graphed this using the parametric ...
2
votes
0answers
212 views

Plotting orbits of trajectories of bodies sharing the earth's orbit in coordinates centered at the barycenter of the solar system [closed]

I am attempting to try and plot the trajectories of a trio of satellites that are orbiting with the earth-moon system around the solar system's barycenter. Originally, I had the satellites in orbit ...
4
votes
1answer
404 views

Building Projection Operators Onto Subspaces

Intro In quantum mechanics one uses projection operators in many problems / derivations. At the problem at hand I need to build projection operators (matrices) onto a subspace of my Hilbert space. I ...
4
votes
1answer
363 views

eigenvalues of symbolic Hermitian 3X3 matrix

My question is similar to Get rid of imaginary parametric eigenvalues of a Hermitian matrix However I find it puzzling that the situations is so complicated, since in my case I discuss only a $3\...
5
votes
0answers
307 views

Mathematica packages for numerically solving the Klein-Gordon and Dirac equations?

The book "Advanced Visual Quantum Mechanics" by Thaller includes Mathematica software packages for the numerical solution of the Klein-Gordon equation and the Dirac equation (subject to user-defined ...
3
votes
0answers
126 views

Finding possible lattice planes of a crystal structure

After generating a crystal structure from a crystallographic data and duplicating it to a larger crystal system I would like to find possible lattice planes of this crystal. It is well-known that the ...
7
votes
1answer
114 views

Cross product without reordering (noncommutative)

Not related to question I assume this question (as it is of very general structure) might have been asked before, unfortunately I did not find an answer to it - despite what I used as search queries. ...
2
votes
1answer
245 views

Defining a two-index field in FeynCalc

I'm looking to define a two-index variable $h_{\mu \nu}$ in FeynCalc but the only examples of tensors with more than one index I've seen have been constants. Can a two-index variable be defined in ...
3
votes
1answer
405 views

Computation of spin connection

I want to use to Mathematica to compute compute a tensor, but I don't know how to do it. Actually, I want to compute spin connection which has been discussed in general relativity. Spin Connection ...
1
vote
0answers
87 views

Fisher Forecasting Using Mathematica

I'm need to do a Fisher Forecast for my experimental physics requirements. I'm trying to constrain parameter for a modified Friedmann equation. Is there any package or code that any of you have handy ...
3
votes
1answer
145 views

MCMC problem for Acoustic Scale Cosmology

I'm using this MCMC Mathematica package https://github.com/joshburkart/mathematica-mcmc to do a MCMC on number of different data sets for a problem. I'm almost done but I have one problem. Whenever I ...
0
votes
0answers
157 views

How to perform 3+1 decomposition of spacetime with xTensor?

I am new to xTensor. I would like to perform 3+1 decomposition of spacetime with xTensor, but I do not have any clue. Although in xTensorDoc.nb, the author gave some hint, I absolutely have no idea of ...
0
votes
1answer
102 views

How to efficiently exponentiate a differential operator with non-commuting terms, acting on an infinite series?

My question is related to this one, but I am more explicit with the form of the operator in the exponential and the function $f$. Let us have the expression: $$ e^{\mathrm{i} \left( f(x)(\hat{q} \...
1
vote
0answers
49 views

How to get a conversion factor in new system of unit

There is some numerical relation $I = \frac{c}{8\pi} E^2$ between the wave intensity $I$ and the electric field strength $E$ written in CGS (centimetre, gram, second) system of units, where $c$ is ...