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.

29
votes
3answers
2k 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 ...
7
votes
2answers
719 views

Qubit passing through quantum gate animation

I have the following code: ...
1
vote
1answer
288 views

FeynRules and defineing lagrangian

We are going to add new term to Standard Model, I defined a new vector field ...
2
votes
1answer
385 views

Motion with friction [closed]

I am trying to use DSolve to get an equation of motion with constant kinetic friction. I used: ...
4
votes
1answer
364 views

Solving coupled Differential equations with matching condition

I am somewhat new to using Mathematica and was wondering if it can solve the following: $(a \rightarrow h)$ are constants $a w^4[x] =-b + c(d-w[x]-e x),\hspace{2em} x_1 \leq x \leq x_g \\ a w^4[x] ...
5
votes
1answer
588 views

Solving the nonlinear Cahn-Hilliard equation

I am trying to solve the Cahn-Hilliard equation with a "random" initial condition and boundary conditions as described below: $$h_t = \nabla^2\left(-\gamma \nabla^2 h + h^3 - h\right)$$ Boundary ...
4
votes
1answer
136 views

Experimental Data Overlay/Fit

I have two different sets of data represented in Contourplots: As you can see, in different positions of space, both have these very characteristic sets of four peaks (2 blue and 2 yellow). What I ...
3
votes
0answers
195 views

Differential equations in partial derivatives

I am trying to get numeric solution for equations: $$ \left\{x^{(2,0)}(u,t) \left(1-\frac{y^{(1,0)}(u,t)^2}{\left(x^{(1,0)}(u,t)^2+y^{(1,0)}(u,t)^2\right)^{3/2}}\right)+\frac{x^{(1,0)}(u,t) y^{(1,0)}(...
3
votes
2answers
430 views

Transient temperature profile in cylinder

I am trying to simulate the temperature profile inside a very long cylinder that is suddenly immersed into a cooling fluid: For this, I am writing a single heat equation where the physical properties ...
5
votes
1answer
210 views

Constructing matrices from quantum states expressed in the bra-ket notation [closed]

Written in the bra-ket notation, I have a (quantum) state/vector of the form: $$ |\alpha, J \rangle = \Bigg [\frac{\alpha}{(1 + |\alpha|^2)}\Bigg ]^{J} \sum_{m = - J}^{J} \sqrt{\binom{2J}{J+m}} \...
32
votes
3answers
4k views

Remove noise from data

Hi, as you can see above I have some experimental data which has a large offset and shows clear noise fluctations around the tendency of the curve. I wanted to ask if someone could suggest me a method ...
1
vote
0answers
205 views

Solving the 2D heat eqn with a rastering q term

I'm brand new to Mathematica so please forgive my lack of knowledge, I'm trying to learn it for my current internship! I'll try give some background to what I'm doing and where I could do with some ...
1
vote
0answers
81 views

Dynamical Evaluation error and infinite loop? [closed]

I'm trying to set up a solver to solve for the chemical potential given the constraints (particle number and magnetization). The function MuandShift finds the ...
2
votes
0answers
319 views

Linear tangent steering law and orbital insertion altitude

I've been trying to figure out how to build a rocket launch simulation that allows the user to specify the desired altitude at which a payload will be inserted into a stable circular orbit, but have ...
2
votes
0answers
180 views

Modelling heat exchange between flowing fluid and surroundings

Starting from this question: Couple a PDE and ODE in NDSolve I would like to modify the fluid from static to a flowing one in the y direction. that's the original code that I modified a little bit: ...
4
votes
1answer
784 views

how to plot the dispersion curve in first brillouin zone?

Those who know some solid state physics should know what the first brillouin zone is. How do I plot the dispersion relation in the 1st brillouin zone so that the curves can 'fold back'? For instance ...
3
votes
1answer
207 views

Get rid of imaginary parametric eigenvalues of a Hermitian matrix

I have four matrices with below structures (mat1, mat2, mat3 and ...
3
votes
2answers
1k views

Solving equation of motion for position dependent force

Consider the functions U[x_] = 1/x^2 - 2/x; F[x_] = -1*U'[x]; But here comes the tricky part: Write down the object's equation of motion, i.e., Newton's ...
12
votes
2answers
908 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,\;\...
17
votes
1answer
678 views

Couple a PDE and ODE in NDSolve

I would like to solve an example of non-stationary heat transfer with a coupled PDE and ODE. Let's assume that we have 1 dimensional bar of length $L$ with uniform initial temperature. The right end ...
12
votes
3answers
400 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 ...
3
votes
2answers
836 views

How to solve time dependent pde?

I have set out to try and solve a time dependent wave equation with specific boundary conditions, but I am running into a bit of a snag. As you can see, I am trying to solve for the wave function u[t, ...
0
votes
1answer
454 views

Making a bouncing ball simulation interactive [closed]

Problem A ball initially at height $h_0$ above a horizontal surface is dropped at time $t = 0$ with zero initial velocity. When it arrives at the surface, the ball bounces in the vertical direction ...
19
votes
2answers
808 views

Fractal basins of attraction in a Magnetic Pendulum

I am trying to write a Mathematica program that realizes a graphical approximation of the basins of attraction in a Magnetic pendulum subject to friction and gravity, in which the three magnets are ...
1
vote
1answer
657 views

Visualizing interference of two waves on the plane

I need to make an animation of interfering coherent waves on the plane, that are produced by two sources. I would really appreciate if I am able to change the wavelength. I am quite new to Wolfram, ...
3
votes
1answer
172 views

Finding Maximum Value of ElectricField in a bounded region

I have been trying to find the maximum value of the magnitude of an electric field in a bounded region. NDSolve gives the value of the potential inside the region ...
1
vote
1answer
758 views

Need help in understanding hydrogen orbitals code [closed]

I just got a copy of Mathematica and I'm busy learning the basics. I got mathematica so I can plot hydrogen orbitals but I'm completely lost. I looked around and I found this: ...
3
votes
2answers
118 views

Sorting Data by Differences between Columns

In Band Structure calculations one gets rather extensive data of Energy Values (Eigenvalues) and the associated Eigenvectors out of the solution of an Eigenequation of e.g. the form H.$\psi$=E.$\psi$. ...
0
votes
1answer
351 views

Determination of coefficients matrix in one dimensional Kronig-Penney Model

In page 169 , Chapter 7, from book "Introduction to solid state physics (Eighth Edition)" by Kittel, there are 4 equations as below. Without need to any additional physics information I just want to ...
1
vote
2answers
288 views

Plotting spectral emissive power versus wavelength

I am trying to plot a set of curves using the Planck distribution function for the following temperatures: (2000,1000,400,100)K. I attempted to do the following: <...
4
votes
1answer
594 views

Learning Mathematica for Physics

I'm a student of physics with little to no background in programming. I have to learn Mathematica for my Physics project. As of now, I need it for doing numerical integration, numerical optimization ...
1
vote
1answer
271 views

NDSolve for complex variables

I am trying to simulate a multiple pendulum system with damping as follows: ...
1
vote
1answer
305 views

My code uses `ClebschGordan` but `Mathematica` is using `ThreeJSymbol`

I'm using a function that calculate CG coefficients with the function ClebschGordan but instead, I've got the following error because Mathematica is using ...
5
votes
1answer
441 views

Solving 2D Laplace equation for irregular boundaries [closed]

I want to solve Laplace equation in 2D with $x$ and $y$ coordinates with the boundary conditions $V(0,y)=-180$; $V(x,0)=50x-180$; $V(x,6)=50x-180$; $V(453.595-\sqrt{450.05^2 - (y - 3)^2},y)=0$ The ...
6
votes
1answer
508 views

How to numerically solve a 1D time-independent Schrödinger equation for two interacting particles

Solving the 1D single-electron time-independent Schrödinger equation has been demonstrated using NDEigensystem here. There, the single-electron Schrödinger equation ...
10
votes
1answer
789 views

Calculating density of states from lists of momentum/energy data

I am trying to calculate the density of states for a 2D system given certain band structure data organized in a specific format. Below is an example of my procedure: Beginning with a simple 2 x 2 ...
3
votes
2answers
581 views

Ion motion in uniform axial magnetic field and radial electric field [closed]

I'm trying to model an ion's 3D motion in a constant/uniform axial magnetic field and a radial electric field (similar to a cylindrical magnetron, but two positive parallel center electrodes offset by ...
3
votes
1answer
235 views

How? 2-dimension visualisation of all 3d-orbitals as either a density plot or as function of maximal radius

I've been playing around with some d-orbitals and have been trying to view their maximum in two dimensions. At the moment I've progressed to the point where the d__ orbitals are superimposed onto one ...
1
vote
1answer
404 views
0
votes
1answer
355 views

Lagrangian for Spring-Pendulum [closed]

I solved a Spring-Pendulum System with NDSolve. I tried to plot a graph with the interpolated data but always returns a message "An improperly formatted directive with head Symbol was encountered." <...
6
votes
1answer
98 views

What's up with PauliMatrix with a string argument?

Looking at the definition of PauliMatrix (not the documentation), I realized that it is defined for arguments 0, ...
2
votes
1answer
857 views

Why Integral does 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{\...
0
votes
0answers
155 views

Solving Time-Dependent PDE's Analytically with no non-trivial Boundary Conditions

I'm having some trouble solving a partial differential equation that is supposed to model the propagation of a scalar field in Schwarzschild spacetime using spherical coordinates. I'm using the DSolve ...
4
votes
1answer
94 views

Recycle boundary condition

I'm having the following issue that can not find a solution , by using this boundary condition u[0, t] == 2 u[1, t] that Mathematica does not understand, someone ...
0
votes
2answers
142 views

Jump boundary conditions

I'm having the following issue that can not find a solution , by using this boundary condition ...
0
votes
2answers
203 views

Free-fall air resistance problem

I´m working on a free fall problem and I got an equation with variable $k$ when the situation has air resistance. Then I compared with no air resistance equation ($-4.9$, considering t variable). So, ...
2
votes
0answers
153 views

What is a good way to model fluid stream contours around airfoils?

I am an undergraduate student and am doing a project on conformal mapping for my complex analysis class. I have had one heck of a time trying to plot stream function contours to model fluid flow in ...
0
votes
1answer
72 views

Solve returns empty list on system of 62 linear equations with undeclared known variables

Context: I am trying to solve a set of equations generated by hand from a complicated, but not particularly strange system via Newton's Second and Third Laws, and a few constraints. All the resulting ...
0
votes
1answer
70 views

Verify angle pi/4 maximizes launch range [closed]

I'm solving the equation of motion for a projectile in the x, y plane and got this: R = v0^2 sin(2 theta) / g where R is the range of how far the object will ...
8
votes
2answers
1k views

Lagrangian to Hamiltonian

I want to go from Lagrangian description to Hamiltonian one. Using the example given by Mathematica I do something like: ...