# All Questions

8,555 questions
Filter by
Sorted by
Tagged with
22 views

19 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 ...
29 views

26 views

### First-principles benchmark of CFD solver

A decade ago I saw a ~20 coupled state + random number problem that was used as a benchmark for meteorological CFD tools. It had a fractal dimension (of the chaotic attractor) around 2.3, I think. I ...
45 views

### Solve the 1D Poisson equation by integrate twice the charge density

Let's say I have a set of data (1-D array) called charge density along the $z$ direction (obtained from DFT calculation), and I want to integrate it twice with respect to $z$ coordinates points (i.e., ...
27 views

### Linear advection equation: 1D wave with reflection at boundaries (solid walls)

I recently asked a question about this topic, but too much was unclear to me at the time which yielded poor response. (You can find the previous question here). Anyway, I am now trying to solve the ...
35 views

### Inverse Newton Method for optimization: is this the correct algorithm?

I am trying to implement the algorithm in this article. I have already asked a question before about it here, and I am trying to figure out what I am doing wrong. This time, it's this section of the ...
113 views

### Fast algorithm for computing the similarity between two arrays

Suppose there are two arrays (They have the same length), I want to give a quantitative description about the similarity between them. I define a formula like this, which means we can shuffle them ...
42 views

### Is there an efficient algorithm for calculation of continued fraction expansion from decimal digits?

Suppose to calculate the continued fraction expansion of $\pi$, the common-sense algorithm would be to take the decimal part, perform inversion, which will give the next term as integer part, and the ...
35 views

### Spectral solver on em-pic

I'm recently studying for the spectral solver to implement EM-PIC code. I read an article and have some questions. Many PIC codes uses spectral solver to overcome numerical artifacts on FDTD. In the ...
96 views

### Numerically stable and fast sum of last K elements in sequence

Suppose I have a long, possibly infinite, sequence $x := [x_1, x_2, ...]$, and I want to use it to compute another sequence $y:=[y_1, y_2, ...]$ where each element is the sum of the last K elements of ...
65 views

34 views

### Computing node, cell and face incidence in 3D structured meshes

I'm developing a PDE discretization algorithm that works on 3D uniform structured meshes. For this algorithm, I often have to traverse the mesh nodes and get the ids of all the faces and all the cells ...
38 views

### Is this behaviour normal for a Leonard Jones monte carlo simulation?

I am simulating a Leonard 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 ...
45 views

### Solving ODE for Mosquito Densities

I am trying to calculate the densities of mosquitoes at different life cycle stages. I want to use historical weather data (such as air and water temperature) and compare the results of the model to ...
32 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 ...
26 views

### Pseudocode for implementing Tunneling Algorithm

I‘m searching for coding examples (Python, matlab, C++, ...) of the tunneling algorithm for finding global minimums in terms of Optimization. Even though some Users have claimed to implement the ...
74 views

### Solving ODEs with nonlinear constraints

I'm trying to solve an ODE problem. Let's say $\mathbf{x}(t)$ represents the position of a particle at time $t$, and $\mathbf{u}(\mathbf{x},t)$ is a velocity field defined in Cartesian coordinates on ...
22 views

### Question regarding OpenFOAM objectRegistry and related subjects [closed]

I am trying to understand objectRegistry, IOobject, regIOobject, etc in OpenFOAM and I have already gone through the wiki pages. They have cleared some of the doubts but not all. Questions regarding ...
37 views

### 2D diffusion equation using Finite Volume Method

i am working on an assignment problem: Consider a two-dimensional rectangular plate of dimension L = 1 m in the x direction and H = 2 m in the y direction. The plate material has constant thermal ...
57 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,...
63 views

### Efficient way to find eigenvalues of complex symmetric matrix with real off-diagonal elements

My goal is to find all eigenvalues (and eigenvectors) in a given range of magnitudes of a complex symmetric matrix with real off-diagonal elements (only diagonal elements are complex). Currently I'm ...
33 views

### Lexicographically order matrix into a vector

I am trying to implement the algorithm contained in this article here. It is about solving a 2 and 2.5D Fredholm integral, focused on bidimensional NMR experiments. I've made significant progress, ...
45 views

### 2d Schrodinger Equation via matrix diagonalization in C

I am trying to solve the time-independent Schrodinger equation in two dimensions via discrete matrix diagonalization. I want the energy eigenvalues and the corresponding eigenfunctions for a given ...
20 views

### How can I compute electronic coupling 'H' for estimating the standard rate k_o from Marcus-Hush-Chidsey theory during heterogenous electron transfer?

I am trying to calculate the Marcus-Hush rate constant k_o for heterogeneous electron transfer in the context of a monolayer redox couple as described in Eq. (11) in this paper [ doi:10.1016/j....
56 views

### Compute mass matrix in vibrations problem by using finite element method

I have to compute the mass matrix of a Hexahedral mesh. There are 3 methods to compute mass matrix. I'm interested in one method which consists of dividing the mass of the element by the number of ...
100 views

### Automatically generate constraints for trajectory optimization

This is a follow up to my previous post here I'm interested in performing trajectory optimization from the problem mentioned in abov link. I want to supply the following as dynamical constraints to ...
67 views

### Linearize non-linear PDE with BCs to hyperbolic problem: How does linearization affect BCs?

I am working with the Shallow Water equations that is a system of non-linear PDEs that simulate water waves propagation on some domain, in my cases the $x$-axis. I have here a GIF showing the results (...
28 views

### Why does torque kill my Job? [closed]

I am using PBS Torque scheduler to run my replica exchange molecular dynamics jobs. I am using Sander.MPI of AMBER to run some DFTB simulations. The problem I am having is that my jobs keep crashing ...
37 views

### How do I use Newton's Method to Solve this semilinear equation?

I have a semilinear system $$\frac{du}{dx} = -\lambda u(x)$$ With boundary conditions $$u(0) = C$$ $$u(L) = Ce^{-\lambda L}$$ Below is my attempt at Newton's method. The logic is i) Use a central-...
29 views

### Convergent Finite Difference Scheme for Parabolic Equation

Consider the PDE $$u_t = b_{11}u_{xx} + 2b_{12}u_{xy} + b_{22}u_{yy},$$ where $b_{11}, b_{22} > 0$, and $b_{12}^2 < b_1b_2$. In Strikwerda's book, the ADI scehme \begin{align*} \left( 1 - \frac{...
112 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 ...
46 views

### Best ways to avoid singularities in kernels when solving integral equations numerically

Take a Fredholm integral equation $$u(x) - \lambda \int_{-1}^{1} K(x,y)u(y) \, \mathrm{d} y = f(x)$$ and discretize it via (say) Gaussian quadrature with nodes $\{x_j\}$ and weights $\{w_j\}$ to get ...
26 views

### Prerequisites to understand Line Integral Convolution paper

I am learning techniques like line integral convolution to visualize vector fields in Python and want to make an implementation myself. However. I have no experience with texture advection methods. ...
100 views

### Creating positive definite matrix

I'm trying to create a big (50.000x50.000) positive definite correlation matrix . The matrix should be correlations of effects on phenotypes ascribable to people sharing the same environment. I have ...
This is a follow-up to my previous question here I've the following system of equations for studying information flow in the below graph,  \frac{d \phi}{dt} = -M^TDM\phi + \text{noise ...