Questions tagged [computational-physics]

Computational physics is the study and implementation of numerical algorithms to solve problems in physics for which a quantitative theory already exists.

Filter by
Sorted by
Tagged with
1
vote
0answers
48 views

Problems with simulation of a spatial filter 4f setup (Python)

I have a question about my code which computes numerically the output field of a 4f setup with a pinhole in the middle which works as a spatial filter. My setup consists of two lenses with 50mm focal ...
1
vote
0answers
69 views

More efficient way to calculate magnetic field using Biot-Savart

I am writing a program in python that is supposed to calculate the magnetic field along a conducting coil that is made up of a bunch of points, and the magnetic field is generated by other conducting ...
7
votes
3answers
315 views

Finite-difference software for solving custom equations

Are there any good, easy to use, software for simulating the evolution of systems of generic differential equations? I know there are custom programs for various specific circumstances (such as ...
0
votes
0answers
26 views

Set of integrators do not consistently solve an equation in Python

I must solve the following second order differential equation: $\delta \phi^{''}_{\mathbf{k}}+(3-\epsilon)\delta \phi^{'}_{\mathbf{k}}+\left(\frac{k^2}{a^2 H^2}+\frac{V_{,\phi\phi}}{H^2}-6\epsilon +4\...
0
votes
0answers
21 views

Calypso with quantum espresso for nanoparticles

Any one uses Calypso structure prediction? http://www.calypso.cn/documentation/ I want to run a two type molecules nanoparticle structure Any suggestions will be helpfull. Or if any other tools for ...
2
votes
1answer
109 views

Why is $1/r^2$ force law giving spiral trajectory?

I have written a program to solve for Newton's 2nd Law of motion for a given force law, in 2D polar coordinates. It is known that if the force law is of the form $k/r^2$,we get conic sections as ...
3
votes
2answers
104 views

Optimization of expensive model with many parameters

I have a physical model which takes $\sim50$ parameters and gives $\sim2000$ outputs taking tens of minutes to run. I need to optimize these parameters to give outputs as close as possible to data. ...
0
votes
1answer
59 views

Why is Time evolving block decimation so efficient?

I have a short question about Time evolving block decimation (TEBD). During a lecture I was told that this method is very efficient in evolving 1D quantum spin systems with only nearest neighbor ...
1
vote
1answer
92 views

Calculating the Strange Attractor of the Duffing Oscillator in C++

I am simultaneously trying to learn computational physics methods, chaos, and C++. I think this is the right site for the question, and I apologise if not. I started working through Thijssen's ...
1
vote
1answer
55 views

Which are the right configurations in the Markov chain of a Hamiltonian Monte Carlo algorithm?

I have a question about the Markov Chain Hamiltonian Monte Carlo (MCHMC). Hamiltonian Monte Carlo is known as Hybrid Monte Carlo too. I'll describe the steps of the algorithm. We have at the ...
3
votes
0answers
51 views

Choosing good modelling method for solving Boltzmann equation

I'm writing a solver for Boltzmann Equations (BE) including a force term in rarefied plasma, for my PhD. The aim is to see if an instability occurs inside an electric streamer (theoretically it should,...
0
votes
0answers
20 views

Hawkes Process : recursive formula for : $R'_{m,n} (k) = \sum_{ \{i : t_i^n < t_k^m \} } (t_k^m - t_i^n) \exp ( - \beta_{m,n} ( t_k^m - t_i^n ) ) $

Following the advice of a fellow mathematician, I am asking my question here from (https://mathoverflow.net/questions/365554/hawkes-process-recursive-formula-for-r-m-n-k-sum-i-t-in-t) I need to use a ...
0
votes
1answer
37 views

Getting streamline for a lid driven cavity flow in openFoam/ParaView

I have installed openFoam on Debian GNU/Linux and learning from official user guide. I have a problem with generating streamlines. I am trying to generate streamlines as explained in the post ...
2
votes
1answer
91 views

Calculate stable time step DG method for advection-diffusion

For stable time steps for the RKDG method for transport equations we require that $$ \Delta t \le \frac{\Delta x CFL}{(2k + 1)|\lambda|}, $$ where $\lambda$ is the eigenvalue of our conservation law ...
2
votes
1answer
61 views

Effect on methods like Crank-Nicolson of adding a potential term, changing heat equation to Schrodinger equation

I'm studying up on methods for numerically solving the Schrodinger equation. The Schrodinger equation with a zero potential is formally identical to the heat equation in the sense that we just make ...
0
votes
1answer
60 views

Plotting the difference between an exponential and its Taylor expansion as a function of number of terms?

I'm terribly green, please forgive me. I need to plot the difference between a chosen calculated Taylor expansion $e^x=1+x+\frac {x^2}{2!}+\frac {x^3}{3!}+\frac {x^4}{4!}+\frac {x^5}{5!}$... and the ...
0
votes
0answers
25 views

COMSOL Circularl polarization

I'm having some problems trying to implement circularly polarized light in COMSOL Muliphysics. For a isotropic homogenous media, I've obtained without problems the TE and TM reflectance curves. ...
0
votes
1answer
33 views

MATLAB ode45 doesn't start at initial conditions

I wrote a code in MATLAB to solve a system of differential equations, but my solution doesn't seem to take into consideration the initial conditions I specified. I am not sure how to interpret this ...
0
votes
0answers
21 views

How to plot a function for multiple values of a parameter in the same set of axes in Python?

I'm currently trying to plot a graph wich describes a photoionization cross section as a function of incident photon energy for optical transition in a semiconductor for different values of the $\...
0
votes
1answer
66 views

Applications of Julia in Chemistry and Molecular Physics?

I was wondering if there are any Theoretical & Computational Chemistry (MM, QM) codes or publications out there that are based primarily on the Julia programming language?
0
votes
1answer
50 views

Solving an ODE using odeint in Python and continuing the integration

The following relates to the linked question: Scattering of waves in a symmetrical potential (using python) I have attempted to solve the problem for $U(r)$ using ...
0
votes
0answers
63 views

Applying boundary Conditions on FEM

I have a partial differential equatons as shown below. $$\dfrac{d}{dx}((1+x)\dfrac{du(x)}{dx})=0$$ With the following boundary conditions. $$u(0)=0, u(3)=10$$ To solve it using FEM, I multiplied the ...
0
votes
0answers
38 views

Solving nonlinear pendulum using Runge-Kutta 4 for smaller steps

I am trying to solve nonlinear pendulum using 4th order Runge-Kutta method for limits between a=0.0 to b=110 seconds and simulated the results to observe the pendulum movement. But when I increase the ...
0
votes
1answer
90 views

Applying weak form

I have two dimensional equation and I want to solve it using Finite Element Methods. $$ \nabla . (\alpha(x,y)\nabla u(x,y)) + \dfrac{\partial u(x,y)}{\partial x}+\dfrac{\partial u(x,y)}{\partial y}+u(...
3
votes
1answer
106 views

Difference between MoM and FEM

Method of Moments and Finite Element Methods are two of the most used methods in computational electromagnetics to solve electromagnetic equations. As it is known, in FEM sparse matrixes are used ...
2
votes
1answer
132 views

Numerical calculation of Wannier function in optical lattice

I am working out some optical lattice band structures (example here). I have no issue with setting up the eigenvalue equation: $$ H_{jj'}c_{j'}=Ec_{j'} $$ Where $H$ is the tri-diagonal matrix that ...
0
votes
1answer
124 views

Scattering of waves in a symmetrical potential (using python)

I'm looking at scattering of waves in a symmetrical potential as part of a research project. If a plane wave $e^{(ikr)}$ is incident on a spherically symmetric potential $V(r)$ the scattered wave is ...
3
votes
2answers
140 views

Solving a Boundary Value Question $\frac{d^2y}{dx^2}=y\cos(x)+\frac{\sin(x)}{x^2+2}$ using Python

I'm looking to solve this boundary value question using the shooting method! $$\frac{d^2y}{dx^2}=y\cos(x)+\frac{\sin(x)}{x^2+2}$$ given the initial values: $$y'(x=-1)=-1\\y'(x=5)=0$$ I'm aware of ...
1
vote
0answers
44 views

Lattice spring models vs. finite element models

I am a beginning graduate student in the field of continuum mechanics. It is my understanding that most problems in this field are numerically solved via finite element methods (FEM). However, I have ...
1
vote
0answers
29 views

Tackling multiscale problem in numerical simulation

In a dusty plasma system there are more than one component with different masses, i.e, electrons, ions,neutrals and dust grains. Accordingly, there are more than one temporal and spatial scales ...
0
votes
0answers
53 views

Why this LJ molecular dynamics result doesn't converge?

I am doing a molecular dynamics simulation of Leonard Jones 6-12 potential. But instead of converging to a particular value. It always stays between -5.58 to -5.62. The standard value is -5.517. The ...
1
vote
1answer
57 views

How long should the hyperelastic equations be solved before updating the mesh?

How long should the hyperelastic equations be solved before updating the mesh? To be specific, I'm interested in the hyperelastic model with a neo-Hookean solid: $$ \nabla\cdot\sigma + f = \rho\ddot{...
-1
votes
1answer
41 views

Numpys `tensordot` and what is happening mathematically

I've encountered a program where np.tensordot was used, so I tried looking it up but I can't really understand what this function is doing... I feel rather ...
0
votes
1answer
60 views

Is this behaviour normal for a Lennard-Jones monte carlo simulation?

I am simulating a Lennard-Jones fluid using MC simulation. The code always uses a reduced unit. I want to find the potential energy of the system. Periodic boundary condition implemented. I have ...
-1
votes
1answer
51 views

How to get free energy surface of a 3d Ising Spin system using Monte Carlo simulation?

I am doing a Monte Carlo Simulation of the properties of a 3D Ising Spin system. I want to get the free energy surface of the spin system from the simulation. It is a magnetization vs free energy ...
0
votes
1answer
70 views

Why the magnetisation shows abrupt behaviour for this 3D ising spin system

I am trying to simulate a 3D Ising spin system (+1 & -1) using Monte Carlo Metropolis Algorithm. I want to get different physical quantities from this simulation like magnetization, Average Energy,...
4
votes
1answer
149 views

Absence of Discontinuity in Specific Heat Plot Simulated by Ising Model

I am working on 2D Ising model, when I plot "specific heat vs temperature", I can't see any discontinuity at critical temperature around Tc ~ 2.7K. I am enclosing results of all other thermodynamic ...
0
votes
0answers
37 views

Unconditionally stable numerical method for 1st order non-linear coupled ODEs?

I am attempting to numerically solve the following system of ODEs: $$\begin{gather}\frac{dT_1}{dt} = f_1(T_1,T_2), \quad T_1(t=0)=T_{1,0} \\[3pt] \frac{dT_2}{dt} = f_2(T_1,T_2), \quad T_2(t=0)=T_{2,0}...
1
vote
3answers
155 views

What numerical methods are used to model deformations in elastic physics?

What numerical methods are used to model deformations in elastic physics? For example, here's an example of a hyperelastic deformation in Ansys: Perhaps more simply than hyperelasticity, for linear ...
2
votes
1answer
86 views

Using Implicit Euler with second order differential equations

We can numerically integrate first order differential equations using Euler method like this: $$y_{n+1} = y_n + hf(t_n, y_n)$$ And with Implicit Euler like this: $$y_{n+1} = y_n + hf(t_{n+1},y _{n+...
-1
votes
1answer
93 views

If not MATLAB, what software/programming language should I use to simulate/animate wave functions in various potentials + more? (example given)

I want to integrate programming into my learning in math and science in a very specific way. I want to create visualizations and simulations of concepts I am learning. When I learn a numerical method ...
0
votes
2answers
73 views

What is an instance (precisely) in computational complexity?

I am trying to understand the notion of reduction of a problem to another problem. As it is known this has huge impact on classifying the complexity of a problem. The definition of reduction involves ...
0
votes
0answers
35 views

Information resources on the discrete element method (DEM)

A am looking for online resources, which deal with topics related to DEM. I have been heavily involved with computation fluid dynamics (CFD) so far, and I am relatively new to the field of DEM. In ...
0
votes
0answers
100 views

Parallel plate capacitor as simple superposition of Coulomb-fields

I am trying to calculate and visualize the electric field inside and outside of a parallel plate capacitor by assuming a uniform distribution of point charges on each plate and by adding up the ...
1
vote
1answer
88 views

Operator splitting to solve time dependent Schrödinger equation

I encountered the split operator method to solve the time dependent Schrödinger equation during a lecture. I understand the method on a theoretical basis (I think at least), but I'm struggling to ...
2
votes
1answer
91 views

Fourier spectral method for coordinate transformed heat equation

As the title said, I want to solve a coordinate transformed heat equation using fourier spectral method. In particular, I am interested in transforming an uniform grid into an adaptive non-uniform ...
1
vote
1answer
90 views

Numerical integration methods: Explicit vs Semi-Implicit vs Newton-Euler 1, 2 and use in cyclone physics engine

I am trying to understand the difference between explicit Euler and semi-implicit Euler integration, where in explicit Euler the current position is calculated as $$x_{n+1} = x_n + v_n$$ and semi-...
1
vote
1answer
160 views

What is the relationship between shape functions, interpolation functions, and degrees of freedom?

I am a newbie in FEM. I would like to get clarity regarding a few questions on shape functions in this post (please use as simple language as possible). What is the relation between Shape function ...
0
votes
0answers
97 views

Propagation of a Gaussian beam using FFT

I am trying to simulate the propagation of a gaussian beam through a lens using an FFT approach. I tried to implement the approach described by Couairon in this paper at page 43: https://link....
1
vote
2answers
215 views

How to simulate over 1 billion particles?

I want to simulate human erythrocytes in capillaries. I calculated, that for a 1 meter long and 1 mm in diameter capillary there are about 3 billion blood cells. Erythrocytes are actually discs, but ...

1
2 3 4 5
7