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
2
votes
1answer
52 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 ...
-1
votes
0answers
23 views

Are superluminal computers possible? [closed]

I have no idea how a computer works on the lowest voltage moving through tiny circuit chips level, but if you wanna travel space from one star to another, don't you need a faster than light ...
0
votes
1answer
52 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
18 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
19 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
52 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
44 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
61 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
33 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
88 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
94 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
125 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
118 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
134 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
37 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
28 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
49 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
37 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
58 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
49 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
67 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
142 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
36 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
149 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
80 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
90 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
69 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
94 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
85 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
85 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
85 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
115 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
82 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
211 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 ...
0
votes
0answers
54 views

Is it possble to do this complex symbolic calculation with Matlab?

Sorry it's bit abrupt, but recently I am caught up in some symbolic calcualtion which is tedious and almost impossible with mere human hands, so just wondering is it possible to solve the double ...
3
votes
1answer
136 views

Calculation of Mean Square Displacement for Brownian dynamics system with Lennard Jones interactions in python3

I have a problem getting a sensible result for the Mean Square Displacement (MSD) for a simulation of $N$ particles under Brownian dynamics with Lennard-Jones interaction between them with or without ...
1
vote
0answers
57 views

Radial Hartree and exchange-correlation potentials

According to [1] the one-dimensional Kohn-Sham equation is given by $$ \left( -\frac{1}{2} \frac{d^2}{dr^2} + \frac{l(l+1)}{2r^2} + V[\rho;r]\right) rR_{nl}(r) = \varepsilon_{nl} rR_{nl}(r) $$ where $$...
0
votes
0answers
52 views

Troullier-Martins pseudopotential with nonzero angular momentum quantum number

According to [1] the Troullier-Martins pseudopotential for quantum number $l$ is computed by $$ V^{\textrm{KB}}_{\textrm{nonlocal},l}(r) = \frac{\vert{}V_{\textrm{nonlocal},l}(r)\Phi^{\textrm{PP},0}_l(...
14
votes
1answer
1k views

Conserving Energy in Physics Simulation with imperfect Numerical Solver

I am creating a C++ Physics Simulation where I need to move an rigid body through an acting force field. Problem: simulation does not conserve energy. Quesiton: abstractly, how is conservation of ...
3
votes
0answers
65 views

Computation of Troullier-Martins pseudowavefunctions

The computation of Troullier-Martins pseudowavefunctions has been described in [1]. The pseudowavefunction $R^{\textrm{PP}}_l$ is defined by $$ R^{\textrm{PP}}_l(r) = \left\{ \begin{array}{ll} R^{\...
2
votes
1answer
301 views

Numerical Solution to Rayleigh Plesset Equation in Python

I have been trying to numerically solve the Rayleigh-Plesset equation for a sonoluminescence bubble in Python. You can read about this phenomenon here: https://iopscience.iop.org/article/10.1088/0143-...
0
votes
0answers
145 views

Ising model simulation offset critical temperature and interal ernergy

I'm writing a code for the Ising model using WHAM (the weighted histogram analysis method),But it seems to produce critical temperature and internal energy wrong. (newest rewritten code is below) <...
1
vote
1answer
92 views

Numerical bottlenecks

On a desktop scale computer, what are the most important bottlenecks (RAM vs. CPU, single vs. multithread) for numerical calculations? I'm specifically most interested in exact diagonalization and ...
1
vote
0answers
36 views

How to avoid density getting “deleted” in two way rigid body coupling with LBM CFD?

I've been reading this paper recently, which talks about using Lattice Boltzmann methods and two way coupling. Specifically, it outlines fluid solid coupling, and solid fluid coupling, and how simply ...
6
votes
0answers
123 views

Is a complete bacteria simulation with an exascale supercomputer possible?

Will it be possible to simulate a complete (at least simple) bacteria atom by atom on an exascale supercomputer? or is it possible already today with the largest systems? Here, I've read that ...
1
vote
0answers
59 views

Using MATLAB to simulate the Ising Model

I am using MATLAB to simulate a 1D Ising Chain. I am running into an issue where when trying to find heat capacity, my system has a tremendous amount of noise. I'll post my code and an image of the ...
5
votes
1answer
215 views

Consumer hardware for scientific computing?

I'm interested in problems around probability, statistics, and statistical mechanics, and often I find it useful to perform simulations to get some sense of the underlying phenomena. Example ...

1
2 3 4 5
7