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.
332
questions
0
votes
1answer
66 views
How to model waterflow when only a couple of sample points available
Figure below depicts a cross section of a creek for which I am trying to measure the water flow for that section. What we have as inputs are a bunch of sample points on the river. For each sample ...
0
votes
0answers
11 views
How to convert this code to scan random datas instead of binned datas?
I am new to fortran and I am trying to write a code using random datas instead of binned datas in x, y, z as shown in my sample code.
...
0
votes
0answers
44 views
Unsteady Stokes equations in ALE framework
I'm trying to solve Unsteady Stokes equations on a moving domain, using an ALE formulation, that is
$$\frac{\partial \mathbf{u}}{\partial t} - \mathbf{w}\cdot \nabla\mathbf{u} = \nu\Delta\mathbf{u} - \...
0
votes
0answers
61 views
Solving 1D wave equation with finite difference method
I've written a code in Python to solve the 1D wave equation with the finite difference method (the explicit and the implicit methods). I'm trying to perform a mesh convergence study to estimate the ...
0
votes
0answers
25 views
Negative binomial expansion of general symbolic polynomial
Using Sympy, I would like to compute the negative binomial expansion of a general symbolic polynomial, e.g., $(x_1 + x_2 + x_3 + 4 x_4)^{-1}$. I understand that I can go by recursively partitioning ...
0
votes
0answers
28 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
27 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 ...
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
82 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
33 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
0answers
44 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
124 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
71 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
72 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
0answers
60 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 ...
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}...
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
137 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 ...
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 ...
0
votes
0answers
48 views
Simulate friction arround steady-state point
When simulating a friction dynamic system, I have come to a problem when approaching steady-state.
In the example below, a box moves along a surface with a certain friction coefficient:
...
0
votes
0answers
35 views
A preconditioner for self-consistent iteration
I tried to derive a preconditioner for self-consistent iteration similar
to section IX in arXiv:0804.2583.
For simplicity, consider here only
one orbital (one or two electrons) systems.
Suppose that ...
0
votes
0answers
14 views
Compute cell values and isosurface constant from density values of particles
I am trying to reconstruct the surface for a fluid simulation based on a list of particles using the Marching Cubes algorithm. From different resources, such as http://paulbourke.net/geometry/...
0
votes
0answers
124 views
Double mach reflection at a inclined wedge
I am running into a strange problem when solving the 2D compressible Euler equations on a inclined wedge. To elaborate, my top boundary condition seems to emitting some type of instability. I have ...
0
votes
0answers
43 views
Time sampling changes solution
I'm currently trying to solve a problem using numerical methods. The set-up is rather long, so I apologize in advance...
TL;DR: My solutions change depending on how big my steps are and I don't know ...
0
votes
0answers
45 views
3D Tollmien-Schlichting Waves Imposed in a Channel Flow (Are Physics correct?, etc)
So I am trying to do some further tests on a 2nd-order code Incompressible Navier Stokes equations, by studying transition to turbulence in a Poiseuille flow. Specifically, I'm interested to see ...
0
votes
0answers
115 views
How to keep velocities in check in molecular dynamics simulation?
I am trying to make a very simple molecular dynamics simulator with Reflective Boundary Conditions. I am assigning the initial positions in a cube randomly while making sure they are not too close to ...
-1
votes
1answer
55 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 ...
-1
votes
1answer
99 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 ...
-1
votes
1answer
36 views
Trouble Estimating Motor Parameters with Least Squares in MATLAB
Basically, I'm trying to use Least-Squares to estimate the parameters of a DC motor.
My system can be modeled by the following matrix equation:
$$\begin{bmatrix}V_{input}(t)\\0\end{bmatrix}=\begin{...
-1
votes
1answer
81 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 ...
-1
votes
1answer
58 views
Simulating magnetic particles in a field free point generated by two opposing magnets
This is probably a long shot with such a short time, but I've been trying to get theoretical data for a project I'm working on. The project involves using a very simplified version of magnetic ...
-2
votes
1answer
489 views
Solving Schrodinger equation numerically
Here is the Schrodinger equation that is to be solved:
A 1D hard wall potential in $[0, 1]$. The potential within the potential well is given by a linear combination of Gaussian dips
$$v(x) = - \...