Stack Exchange Network

Stack Exchange network consists of 175 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.

5
votes
3answers
390 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 ...
18
votes
1answer
1k views

How best to simulate n-body systems in a functional way?

I want to simulate a N-body system in the most functional way possible. The system I'm modeling are metallic colloidal particles in a solution of peroxide water, as here http://arxiv.org/pdf/1502....
0
votes
1answer
70 views

Modelling a cylinder

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
34 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
68 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-...
4
votes
0answers
60 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 ...
14
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 ...
0
votes
1answer
51 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
43 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)$. ...
1
vote
1answer
45 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 ...
0
votes
0answers
28 views

Can't get TensoriaCalc to work

So I'm trying to use TensoriaCalc, and it won't work. I put it this ...
33
votes
4answers
3k views

Dynamic Euler–Bernoulli beam equation

I am trying to solve for the vibration of a Euler–Bernoulli beam. The equation is $\frac{\partial ^2u(t,x)}{\partial t^2}+\frac{\partial ^4u(t,x)}{\partial x^4}=0$ For the boundary conditions I ...
12
votes
4answers
6k views

How to create an inverse pole figure color map?

To interpret electron backscatter diffraction (EBSD) results, inverse pole figures are used. A three dimensional space of directions ([100], [110] and [111] for those who know about crystallography) ...
5
votes
1answer
54 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 ...
6
votes
0answers
243 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 ...
1
vote
1answer
147 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: ...
27
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: ...
0
votes
0answers
27 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
38 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
1answer
67 views

Using ParametricNDSolve with n subscripted functions

I want to calculate trajectories of an n-pendulum. For the number n=1 it's just a pendulum, for n=2 a double pendulum , for n=3 a triple and so on. The Solver has to solve n equations for the angle. ...
0
votes
0answers
16 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 ...
2
votes
1answer
1k views

Why does the integral not converge?

I am trying to solve for $\Omega$ this nonlinear integral equation: $$1+\dfrac{z}{k^2}-\dfrac{z^2}{K_2(z)} \dfrac{\Omega}{k^3} \displaystyle\int_{1}^{\infty} \gamma^2\, \text{ArcTanh} \left(\sqrt{\...
3
votes
1answer
62 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. ...
3
votes
1answer
254 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 ...
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.
24
votes
4answers
11k views

Convert spectral distribution to RGB color

Presume that I have a spectrum as a function of wavelength (an example being the blackbody spectrum): I want to convert that to a single RGB color to display on-screen, i.e. the "color" of that ...
24
votes
4answers
1k views

Create an adaptive amount of local variables for error propagation

I intend to write a function which calculates the result and the error for any formula with any amount of variables using the Gauß Error Propagation. The error $\mathrm{d}R$ for a function $A(a,b,c)$ ...
9
votes
0answers
198 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
0answers
66 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 ...
0
votes
0answers
50 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 ...
47
votes
6answers
4k views

ColorData[“VisibleSpectrum”] is wrong?

Bug introduced in 10.0 or earlier and fixed in 11.1 I am trying to visualize the visible spectrum using the built-in ColorData["VisibleSpectrum"] function which "...
4
votes
1answer
128 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 ...
0
votes
1answer
1k views

How to obtain differential equations of motion using Lagrangian dynamics?

I'm confused to find a set of differential equations of motion of a pair of masses, m1 and m2 joined by a spring of constant <...
3
votes
0answers
123 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 ...
3
votes
1answer
303 views

Interpreting Mathematica code on black holes

I am trying to understand the code written down on page 7 of this document (code is in Mathematica) I understand pretty much all of the code on the previous page needed to setup the page 7 code (...
8
votes
1answer
600 views

Diverging solution to coupled second order ODEs from NDSolve

For a physics application I am considering the radial Bogoliubov-de Gennes equations in two dimensions. In dimensionless form they read as follows $$ \begin{cases} \bigg[\frac{1/4-m^2}{r^2}+2(E-1)\...
13
votes
1answer
369 views

Compute the curvature of a bent stack of paper

My goal is to link the curvature of a bent stack of paper in a wind tunnel to its bending modulus $B$, knowing all the other physical properties. To this end, I would like to reproduce the numerical ...
12
votes
2answers
1k views

Boundary condition with spatial derivative is ignored by NDSolve

Consider the following differential equation: $$\begin{align*}&\rho C_p\left(\frac{\partial T}{\partial t}\right)=k\left[\frac{\partial^2 T}{\partial x^2}\right]+\dot{q}\\ &\text{at }x=0,\;\...
12
votes
3answers
475 views

NDSolve's output ignores multiple valid solutions

I'm looking for solutions to a boundary problem involving a non-linear Hamiltonian $$ H(q,p) = \frac{1}{4}\left(q^{2}+p^{2}\right)^{2}, $$ whose solutions are oscillatory but have a complex time ...
2
votes
2answers
3k views

Circular Orbit Velocity in Vector Components

I'm trying to find out how to calculate the initial velocity needed to keep a spacecraft in a circular orbit around the Earth given its initial position and an initial angle theta in a Cartesian ...
0
votes
0answers
76 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
127 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 ...
1
vote
1answer
90 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, ...
2
votes
2answers
68 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
votes
1answer
159 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: ...
12
votes
2answers
795 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
71 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: ...