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
45 views

Book Recommondation for the time-dependent Schrödinger equation [duplicate]

Can you recommend a good book that discusses several methods for the numerical solution of time-dependent and time-independent Schrödinger equation? I have searched the internet several times but ...
1
vote
0answers
63 views

RCWA for Non-Periodic Structure?

I have a quick question regarding Rigorous Coupled Wave Analysis (RCWA) for numerically solving problems (in optics). I am trying to simulate a device which is non-periodic in x, y directions (but is ...
1
vote
0answers
83 views

Representing a 3D system in 2D (Electromagnetic modelling)

Ok so I'm a complete beginner in computational modelling (I use analytical methods of physics typically) but I would like to model an anisotropic, aperiodic (but not random) finite array of metallic ...
1
vote
1answer
452 views

Shooting method - Matlab ODE

I'm trying to solve these equations of hypersonic adiabatic flow over a flat plate. I did all the simplifications and got these equations for the stagnation point flow. $$\left(Cf''\right)' + f f'' = \...
1
vote
0answers
440 views

Is this the correct way to calculate the Madelung constant?

I'm trying to compute the Madelung constant of the ZnS lattice. The method is as follows: The lattice is a face-centered-cubic with basis $S^-: (0,0,0)$ and $Zn^+: (1/4,1/4,1/4)$. The Madelung ...
1
vote
0answers
86 views

Time dependent self-consistent equations

I am facing the following problem. I need to solve numerically a set of coupled equations $$i\frac{d}{dt}f_{n}^{(i)}(t) = \left[U\cdot n(n-1) + \mu\cdot n\right]f_{n}^{(i)}(t) - \sqrt{n+1}\Phi_i^{*}\...
1
vote
0answers
795 views

BiCopter simulation in Matlab

I derived a bicopter dynamical model with two servos and two BLDC motors. And now am trying to simulate it using Matlab. As base for simulation I used this paper and this code Unfortunately, the ...
1
vote
0answers
74 views

fixed point iteration to find out second order non-linear diff equations

I am working on some model analysis, getting two diff equations and after I convert them into matrix form, I have equations looks like $$ [A][X]=C\times\big(\exp([B][X])-1\big), $$ where $C$ is a ...
1
vote
0answers
104 views

Conservation at grid interface in adaptive mesh refinement

I am using adaptive mesh refinement to solve one dimensional inviscid Burgers equation. However I am facing some difficulty to handle grid interfaces which are not uniform (coarse-fine grid interface)....
1
vote
0answers
609 views

radially averaged power spectrum of a binary image does not look like power law

It has been known that Fourier power spectrum somehow obeys power law therefore the slope of the spectrum can be used to calculate the fractal dimension of an image. Many people have used it for ...
1
vote
0answers
286 views

Spin-spin correlation functions in the Ising Model Monte Carlo [closed]

I'm using the Metropolis algorithm for 2D up to 5D for the Ising Model and I want to compute the spin-spin correlation function. $$c(r)=<s_is_r>−〈s_i〉〈s_r 〉$$ but I'm not sure how to estimate $...
1
vote
0answers
635 views

Can you provide me with the source code of DMRG writen by C++?

I want to study the Density matrix renormalization Group(DMRG). Can some one provide me with the souce code which is writen by C++ for study purpose only? The code is not necessiary very professional, ...
1
vote
0answers
299 views

Two Dimensional Nozzle Flow

I've been looking at the book "Computational Fluid Dynamics - The Basics With Applications", by John D. Anderson, and his solution for the one-dimensional subsonic-supersonic nozzle flow using the ...
1
vote
0answers
44 views

Understanding the use of Minimum Translation Vector (MTV) for an elastic collision response

So, I'm trying to simulate polygon rigid body physics, both linear and angular. To calculate the MTV is easy in SAT (Minimum Translation Vector), and to use it to adjust position is also easy: ...
1
vote
0answers
35 views

Keplerian Orbit Estimator [closed]

While calculating the eccentric anomaly of a satellite using the Newton-Raphson method, what initial estimate of the root for E (eccentric anomaly) should be taken for least number of iterations(best ...
0
votes
3answers
279 views

Why there are people that still prefer fortran 77 over new versions?

I am reading some notes from a course in numerical analysis for physical sciences and it is my impression that there are still people that prefer Fortran 77 over new version due to the implicit ...
0
votes
2answers
349 views

Time step relationship with number of elements or material properties

When looking at the output file of my solver, I have been told that the time-step taken by the solver depends on parameters like the total number of elements and their relative size in my geometry, or ...
0
votes
1answer
237 views

How can an engineering student become a computational scinece expert in a short time [closed]

How can a student with zero computing or programming language knowledge, few engineering mathematics knowledge, understand computational science especially Finite Element Modelling (FEM) from ...
0
votes
1answer
189 views

Euler-Bernoulli beam element versus continuum beam element

I am using OpenSees to model a simply supported beam with a point load in the middle. The model is in consistent units. The beam is made up of bilinear quad elements. I have used 30 elements along the ...
0
votes
2answers
129 views

Validating conservation laws from physics

Say I'd like to implement a numerical model of a physical system (e.g. a simple wave equation). Of course the energy conservation law is valid for this system. Is there a way to validate that my ...
0
votes
3answers
234 views

What type of computer science/engineering knowledge someone need to have to study graduate level course in compurational physics?

I am wondering if this is the right place to ask this question. I found a related question on stack overflow https://stackoverflow.com/questions/814312/physics-in-computer-science but it was closed. ...
0
votes
3answers
844 views

Simple Simulation Examples in Computational Fluid Dynamics

I would like to incorporate a CFD topic in a project I currently have. The deadline is a little less than a month from now. Basically, what I would like to do is solve some equations and simulate ...
0
votes
2answers
157 views

General question about Computational Science

I'm student of computer science (BS) and considering computational science as the field to major in for MS program. I have two questions which might look silly but I'm really confused: 1- Are ...
0
votes
1answer
45 views

How to do Weierstrass-transform in MATLAB?

I have a diagonalization problem. I have the eigenstates correctly, and I want to do a Gaussian-smearing (Weierstrass-transform) on them. So I have the wave functions ($\Psi$), and the continuous ...
0
votes
2answers
87 views

Overrelaxation with w < 0

Are there any circumstances under which using a value $w < 0$ would help us find a solution in over-relaxation faster than we can with the ordinary relaxation method? Over Relaxation Method: $$x'=...
0
votes
1answer
98 views

coupled equations with finite difference method

I have these three differential equations in which I need to solve numerically: $$ \frac{dn_0}{dt}= -n_0(t)W_{01}(t) + n_1(t)K_{10} $$ $$ \frac{dn_1}{dt}= -n_1(t)W_{12}(t) - n_1(t)K_{10} + n_2(t)K_{...
0
votes
1answer
238 views

Poincare map for Arnold-Beltrami-Childress Magnetic Field in Python

I want to plot the Poincare map for Arnold-Beltrami-Childress magnetic field for parameters $A=1, B=0.816, C=0.5773$ in Python for the Poincare section $z=0$. Also, I am not able to understand what ...
0
votes
1answer
65 views

Conservatives in shock tube

We know shock tube problem will give discontinuous solution of primitive variables ($\rho$, $v$, $p$). Will it give discontinuous result in flux terms? $F =[\rho u, \rho u^2 +p, \rho e_v]^T$. I tried ...
0
votes
2answers
332 views

What multibody dynamics softwares exist?

I have used the free, multibody dynamics software MBDyn for a while now. It is a good program and also fits my needs. There are good manuals, basic tutorials and examples to be found. There is also a ...
0
votes
1answer
88 views

Indexing Nested Loops in C [closed]

I am having trouble indexing correctly the below statement in C inside a function and then returning it as a pointer. The returning part should not be confusing - hopefully - however the indexing is a ...
0
votes
1answer
432 views

The condition for stability using the leapfrog method

I have the ODE below $$\frac{d}{dt}\pmatrix{x\\ y} = \pmatrix{0 &1\\-a &0}\pmatrix{x\\ y} \enspace .$$ The $m=1$ leapfrog method is defined as: $$y_{n+1} = y_{n-1} + 2f_nh \enspace .$$ For ...
0
votes
1answer
105 views

How many sample points are needed when re-constructing linear combination of 2D polynomials defined over unit circle?

I have a set of first 25 Zernike polynomials. Below are shown few in Cartesin co-ordinate system. z2 = 2*x z3 = 2*y z4 = sqrt(3)*(2*x^2+2*y^2-1) : : ...
0
votes
1answer
69 views

Unexpected behavior, values tend to converge instead of fluctuate. (MD)

I am writing a molecular dynamics program to create an lattice and populate it with atoms/molecules. These then are given random velocities and the system is initialized. Then throughout time the ...
0
votes
1answer
138 views

MAX-SAT and MAX-cut

I have been using MAX-SAT solver to obtain the exact ground state of ising spin glass model: For 1D periodic model, for systems with 50 binary variables and interaction range of 15th nearest ...
0
votes
1answer
68 views

Particle Collision to Static paticles

I have a system of particles with equal distance with each other and another at random positions which is moving with time. I want to know: a) The method by which I can reduce the number of particles ...
0
votes
1answer
78 views

Computer build for scientific or big data computing [closed]

I'm wanting to build a computer for scientific or big data computing (Python, Fortran, Matlab) and I was hoping to get some advice on the type of processor, memory, graphics, etc I would need. I ...
0
votes
1answer
31 views

How to implement the Impulse Based Dynamics for the rigid body dynamics simulation?

I am having hard time learning the method of impulse based dynamics developed by Mirtich for rigid body dynamics simulation. Please help me out if any body has any example code(algorithm) of it. ...
0
votes
1answer
74 views

Stability of PDEs

I am currently trying to solve some PDEs with FiPy. At page 56, the manual mentions (https://www.ctcms.nist.gov/fipy/download/fipy-3.0.pdf). The largest stable timestep that can be taken for this ...
0
votes
2answers
65 views

How to calculate $g_r$ when using the cell method algorithm

I have a self-written MD code in C++. I am simulating atoms using the Langevin dynamics model. I use the linked-cell method to speed up the simulation; as a result, atomic interactions are only ...
0
votes
1answer
377 views

Boole's Rule in python

This is my first post in this forum so please forgive me if it is not the way it should be. My problem is about implementing "Boole's rule" into python. I have succesfully implementet trapezoidal and ...
0
votes
1answer
73 views

Help understanding this numerical surface integration technique?

I'm attempting to write a FORTRAN program that calculates the magnetic field, B, at any point outside of a bar magnet. I'm going to use a first order euler scheme, where each side of the bar magnet ...
0
votes
1answer
52 views

Converting acceleration over time to velocity or speed in code

I have acceleration data from a sensor. X Y & Z. I move the senor in the Y axis. Mostly in a straight line. So I ignore x & z. From the sensor documentation 5.2.1 Acceleration output: ax=((...
0
votes
1answer
1k views

Solving Time dependent Schrodinger equation using MATLAB ode45 [closed]

The Schrodinger equation for time-dependent Hamiltonian is $$i\hbar\frac{d}{dt}\psi(t) = H(t)\psi(t) \, .$$ I try to implement solve the Schrodinger equation for time-dependent Hamiltonian in ODE ...
0
votes
1answer
81 views

Mechanics - Rotational Inertia

I am facing a problem solving a mechanical system which is shown in the scheme below. We assume that coupling of the two shafts is done with a clutch Equations: $$J1*\frac{d\omega1}{dt} + Td(\...
0
votes
1answer
118 views

Solving differential equations in MAPLE (ballistic curve problem) [closed]

TASK: Make a simple animation of an object shot from a catapult. Object is moving through a medium. The problem must be solved in MAPLE. NARROWING OF THE PROBLEM: 2D problem consider atmospheric ...
0
votes
2answers
3k views

Most efficient library to diagonalize exactly large hermitian or unitary matrices

I am working on a physics problem which requires obtaining the exact eigenvalues and eigenvectors of Hermitian and Unitary matrices numerically. Naturally I would like to ask the experts what are the ...
0
votes
1answer
65 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
26 views

solving electron motion in undulator by Boris method

I am trying to use Boris scheme to solve the electron trajectory in undulator. The undulator field I used is: $$B_x = b_0\sin(2\pi \tfrac{z}{\lambda_u})$$ where $b_0 = \dfrac{2\pi c_{0}K}{q m_{e} \...
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
27 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 ...