Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen now

Questions tagged [physics]

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

Filter by
Sorted by
Tagged with
10
votes
0answers
234 views

Solving Maxwell's Equations in Mathematica

For the sake of demonstration (for my students) and practice, I wanted to numerically calculate the electric and magnetic field (3D) for a sphere of uniform density moving slightly to the right and ...
0
votes
1answer
49 views

Remove +0Is from Root function

I'm trying to find the zeros of the eigenvalues (functions of $k_x$) of a self-adjoint $4\times4$ matrix H: ...
4
votes
2answers
94 views

Plotting perpendicular lines to a contour plot (electric field from equipotential curves)

I'm currently working on a experiment about Electric Fields and Equipotential Curves. The problem is that I want to plot (estimate) the curves of electric field using the fact that every one of these ...
2
votes
0answers
60 views

NBodySimulation in ParallelTable [closed]

When I use the NBodySimulation in a ParallelTable I do not get multiple processors effectively activating. If I want to sweep ...
3
votes
1answer
164 views

Distinguish FeynRules, FeynCalc, FeynArts, FormCalc and LoopTools

I am totally confused: I can't distinguish the packages FeynRules, FeynCalc, FeynArts, FormCalc, LoopTools properly. Once I installed FeynRules I think. It seems to include the packages FeynCalc and ...
6
votes
2answers
1k views

How to get Planck length in meters to 6 decimal places

I want Mathematica to format quantities to more decimal places than the default. For example I have tried ...
1
vote
1answer
73 views

WhenEvent error in NDSolve ODEs

I wish to change the term, T'[t] to 0 when S[t]<=0 when I solve ODEs. I have used WhenEvent in my NDSolve part, but it seems not work. The code is ...
3
votes
2answers
73 views

Plotting the derivative of NDSolve divided by the solution

I'm trying to solve the Friedmann equation as is given by: $$ H^{2}=\Big(\frac{\dot{a}}{a}\Big)^{2}=H_{0}^{2}\big(\Omega_{m,0}a^{-3}+\Omega_{r,0}a^{-4}+\Omega_{\Lambda,0}a^{2.3}+\Omega_{k}a^{-2}\big),...
0
votes
0answers
51 views

Eigenvectors of Hermitian matrices [duplicate]

I asked a similar question in the physics stack exchange, but realized my question is probably more suited here. For any Hermitian matrix $H = H^{\dagger}$ we can write $H = P DP^{\dagger}$ where $P$ ...
0
votes
1answer
67 views

Fitting nonlinear function does not converge but looks close to best fit

I'm having trouble fitting this transition temperature equation to my data. Physically speaking, the intensity should flatten out for T>Tc, which seems to be the biggest problem here. The equation I'...
1
vote
0answers
84 views

Free energy surface plotting

Please feel free to move this to a different board if it doesn't fit the best here. I am working on trying to plot the free energy surface of ferroelectric materials, similar to the image below. Each ...
0
votes
1answer
163 views

Where can I find the package RGTC?

I am unable to find the package RGTC which is the prerequisite for the package Surface Charges that I require. All places I searched for only provide one download link which gives Error 404. Can I ...
0
votes
1answer
79 views

Modelling a cylinder [closed]

I am fairly new to Mathematica. I am trying to model an ideal cylinder of uniform density of radius R (any arbitrary value) which has a cylinder of radius R/2 missing from it. The resulting solid is ...
1
vote
0answers
58 views

Fitting a Curie-Weiss law function with a diverging point to a data

I would like to fit a function to some experimental data such that the extracted value of Curie temperature (Tc) describes the temperature at which the response flattens out to a constant value. ...
0
votes
0answers
76 views

How to plot and simulate reaction networks in Mathematica?

I am trying to simulate reaction networks like it's done in the Simulation methods in this paper. They used Xcellerator, so I after installing on Mathmatica 11.2 and trying to run their Belousov-...
0
votes
1answer
55 views

Magnetic field for certain distance

I have a question in theoretical physics. I have a magnetic field created by conductor loop bz = (\[Micro] i )*8/(5 Sqrt[5] R); with distance D = 2b and would ...
1
vote
1answer
50 views

Iterative solution for particle in magnetic field

I have some questions relating movement of a particle calculating with mathematica. A particle (mass: m, charge: q) moves on x-axis from left with speed $v_0$ to a magnetic field $\vec{B} = (0,0,B)$. ...
17
votes
2answers
2k views

Turing patterns

I am new in learning Turing patterns. Is there any sample code available to generate such patterns in ecology model (Lotka–Volterra model)? The above figure is taken from this paper, and is based on ...
1
vote
1answer
61 views

Color scheme problem

I have a problem in the color scheme in a 2D spectra. After a lot of calculations, i can generate a picture like this in the last part using this instructions ...
7
votes
3answers
555 views

How to set interface conditions for optical waveguide in NDEigensystem?

I have been working on waveguide mode analysis using FEM in Mathematica for a week, but I haven't succeeded until now. The optical fiber-like waveguide is featured with different refractive index in ...
0
votes
0answers
34 views

Can't get TensoriaCalc to work

So I'm trying to use TensoriaCalc, and it won't work. I put it this ...
5
votes
1answer
70 views

How to change the default normalization for NDEigensystem?

I'm currently using NDEigensystem to solve a PDE that describes a particle travelling on a hyperbolic (negatively curved) surface. However, the eigenfunctions that are returned by NDEigensystem are ...
4
votes
0answers
67 views

Improving NetChain for Physical Data

I am trying to improve my NetChain to better predict physical data from the industrial standard for water/steam published by the IAPWS. Basically, this industrial ...
1
vote
1answer
180 views

Electric Field Plot

I want to show an electric field of several arrangements of point charges in xy-plane. I wrote a routine that plots an electric field of a charge: ...
6
votes
0answers
247 views

Butter side up?

I've written a piece of code that determines if a piece toast with butter lands on the butter-side or not, depending on its initial velocity and the table height. If you are interested in the physics ...
0
votes
2answers
93 views

Opacity or related issue with DensityPlot3D

I'm trying to make use of the function DensityPlot3D with the following specific example ...
0
votes
0answers
41 views

Manipulate plot of a system of PDEs with NDSolve

Modeling 1D diffusion of an enzyme, e, through a sphere with substrate, s, I arrive at the below equations: I then pass these equations to NDSolve, Evaluate at a range of r and t and Plot and ...
0
votes
0answers
17 views

How can I know the true range of the values returned by AudioLocalMeasurements?

I need to normalize the values of different AudioLocalMeasurements results but I can't seem to find any info regarding the range of values in which each measurement ...
3
votes
1answer
64 views

Evaluating Hough functions by using NDEigensystem on the Laplace tidal equation

Currently I am looking into the use of Mathematica to solve the classical tidal equation of M. Laplace: $$\mathcal{F}\Theta+\gamma\Theta=0$$ whose eigenfunctions $\Theta$ are the Hough functions. ...
1
vote
1answer
60 views

How can I animate two beads each sliding on its own frictionless rail? [closed]

I am told to animate two beads sliding on rails in Mathematica, but I am very confused on how to get a mass on a rail and it move up and down the rail.
4
votes
1answer
322 views

3D rigid body physics engine

Is there a package in Mathematica that will allow me to simulate collisions of 3d rigid bodies? If not, what known libraries could I use and how? For example, one problem I want to simulate is a ...
0
votes
0answers
54 views

How to solve a Poisson's differential equation with a boundary condition at infinity?

Context: This question is relevant to the physical problem of calculating potential for a set of p-n-p junctions. We have to solve a Poisson's differential equation for a p-n-p junction with ...
0
votes
0answers
86 views

Clebsch Gordan coefficients

I'm trying to compute various sums which contain some CG coefficients, where the sum runs over the indexes m1,m2,m corresponding to each of the three angular momenta j1,j2,j. The thing is that when I ...
9
votes
0answers
232 views

Solving the 2D Schrödinger equation with eigensystem, then verifying orthonormality of eigenfunctions with NIntegrate

I am solving the time-independent 2D Schrödinger equation for an interacting electron and hole in the case of anisotropic electron and hole masses, where the interaction is described a modified form ...
0
votes
1answer
106 views

How to construct — based on physics-type notation — a magical simplex $\mathcal{W}$ of bipartite qutrits?

I have a short Mathematica program: ...
5
votes
1answer
151 views

Currents/voltages graph for an electrical circuit

I am trying to design the network graph for an electrical circuit. I have done this by hand so far. Here is the code for the voltages graph ...
4
votes
1answer
165 views
3
votes
0answers
135 views

Physics based predictive model using Predict

Summary: The first order response of a block of metal quenching in a fluid (or a cold block heating in a warm environment) is well known. I am trying to create a physics based predictive model for ...
0
votes
0answers
118 views

How can I define another metric (disformal transformation) in xAct?

I'm using the xAct package. I want to define two metrics with the disformal transformation relation $\qquad \bar{g}_{\mu\nu}=A(\phi) g_{\mu\nu}+B(\phi)\nabla_\mu \phi\nabla_\mu \phi ,$ where $g_{\...
0
votes
1answer
161 views

Plotting elliptical orbits using Verlet method

I'm looking to solve a 2 body system consisting of the Earth and a body of mass in orbit. I'm using the Verlet method to numerically integrate Newton's equation of motion in order to plot an ...
2
votes
2answers
83 views

Finding the amplitude of function solved using ParametricNDSolve

I have been trying to find the peaks of a function I have plotted using ParametricNDSolve. I have to find these peaks to calculate the amplitude of all the various waves in the observed output. By ...
1
vote
1answer
105 views

Conditional evaluation: black hole cross section

I'm trying to calculate the collision cross section of black holes, more precisely, I want the critical impact parameter $b_{\text{crit}}$ for a given initial velocity $v$ such that, at this speed, ...
28
votes
2answers
1k views

Animating wave motion in water

Further to this question I found on MSE, I tried to replicate from here this is as far as I got: ...
13
votes
2answers
877 views

Solving “Resistance between two nodes on a grid” problem in Mathematica

In the context of resistor networks and finding the (equivalent) resistance between two arbitrary nodes, I am trying to learn how to write a generic approach in Mathematica, generic as in an approach ...
1
vote
1answer
91 views

Solve Euler Lagrange equation of motion DSolve

I'm trying to find Euler Lagrange equation of motion. then DSolve the equation for list of variable x1,x2,x3,x4 Here is my code: ...
-1
votes
1answer
171 views

Working with motion equations

I'm trying to solve some Lagrange differential equations of motion, where $L = T - U$. Also, how can I use the solution for each x1, x2, x3, ..., xn? Here is my code: ...
2
votes
0answers
52 views

Symbolic perturbation expansion for quantum mechanics using Hellmann-Feynman derivaties

I am interested in some quantum mechanical perturbation expansion for energies. Actually I want to implement these terms $E_n^{(k)}$. As is stated below one can do that using CAS. I would be ...
0
votes
0answers
67 views

Calculating forces on a truss

I need to find certain forces of the truss shown above, and I am asked to calculate the forces with a matrix. The given values are ...
1
vote
1answer
83 views

A program for finding the summation of an analytical expression

Consider the Baker-Hausdorff formula for two operators $A$ and $B$: $$e^BA e^{-B} =A+[B,A]+\frac{1}{2!}[B,[B,A]]+\frac{1}{3!}[B,[B,[B,A]]]+....,$$ where $[A,B]=AB-BA$. In the case of my problem, $[B,...