All Questions

Filter by
Sorted by
Tagged with
0
votes
0answers
21 views

Tight binding model calculation with Extended Huckel Approximation

I've been reading Albright's Orbital Interactions in Chemistry. In the chapter on solids, he provided a general approach to find the band structure of a solid state system Now if we are to model a ...
2
votes
2answers
63 views

Solving for a vector in a linear system that is both left and right multiplied

I have a linear system where I am given 2 matrices, $A$ and $B$, and 2 vectors, $v$ and $c$, and I need to solve for the vector $x$. $A$ is $n\times n$, $B$ is $n \times n \times n$, and the vectors $...
2
votes
0answers
30 views

Methods to approximate obective function gradients from point cloud

Problem statement: Assume that I have an objective function $f(x)$ which takes as input a $D$-dimensional vector $x\in\mathbb{R}^D$, and that $f(x)$ is sufficiently smooth. Assume further that I ...
0
votes
0answers
23 views

Fast algorithm for computing lower mode shapes and natural frequencies in MATLAB using sparse stiffness and mass matrices

I am looking for a fast algorithm for computing eigenvalues and eigenvectors from sparse stiffness and mass matrices in MATLAB. The eig(K, M) doesn't work with ...
0
votes
1answer
26 views

Produce vertex displacements from volumetric shrinkage data on unstructured meshes

I was wondering what would be an efficient way to produce compatible displacements for mesh nodes/vertices if the computed data is volume shrinkage of each element/cell in the unstructured mesh? ...
1
vote
2answers
55 views

When should I write a matrix-vector function to handle the sparse matrix vector multiplication?

This semster, I have been studying the iterative methods for large sparse matrix system. But I have some questions. For large sparse matrix, we must use an economic storage to store them. The most ...
2
votes
1answer
51 views

Does mass balance hold in convective diffusion

I'm trying to understand how convection-diffusion equations are solved in pipe flow modules available in CFD solvers. $$ \frac{\partial C}{\partial t} + \nabla \cdot (\mathbf{v} C) = \nabla \cdot (D \...
4
votes
1answer
85 views

Recommendation for a fixed-step ODE solver?

My problem involves the solution of a second-order ODE with a fixed-step (input and output). Specifically, this ODE is the radial part of Dirac and Schrödinger equation for a spherical symmetric ...
2
votes
1answer
32 views

Does the k-th approximate solution of a stationary iteration belong to the k-th Krylov subspace?

For an stationary iteration method solving $Ax=b$ as follows: $$ Mx_k = Nx_{k-1}+b, $$ I have known that when $M = I$, i.e., the Richardson iteration, the k-th solution $x_k = x_{k-1}+r_{k-1}$ is in ...
1
vote
1answer
25 views

What is the standard, extrapolation, and modified version of Richardson iteration method?

I have been studying the iterative methods recently. For classical iterative methods solving $Ax=b$, I have seen that the most simplest iteration method is the so-called "Richardson iteration". But I ...
2
votes
1answer
51 views

What method to solve a sparse complex symmetric (non-Hermitian) system?

I have a sparse system (about 78% of zero entries) that is complex and symmetric (but not Hermitian). The following figure shows the structure of the problem. The off-diagonal blocks are incidence ...
0
votes
1answer
54 views

Multi-domain 3D Geometries for MATLAB PDE Toolbox

In principle the PDE Toolbox in MATLAB can handle multi-domain 3D geometries as noted here. This feature and the associated function geometryfromMesh were introduced in MATLAB R2018a. The associated ...
0
votes
0answers
23 views

Can't plot correctly precession of perihelion of Mercury in MATLAB using ode45 or ode23

I was trying to plot precession of perihelion of Mercury using matlab. For this I am following a book Computational Physics by Nicholas J. Giordano and Hisao Nakanishi 2nd Edition. In that book ...
2
votes
0answers
7 views

Find index for submatrix with maximum sum

Given an N-dimensional matrix A, I want to find an M<N dimensional index array I such ...
2
votes
1answer
76 views

Why Krylov subspace iterative methods are faster than classical iteration?

This semester, I have been studying the most popular iterative methods, i.e., Krylov subspace iteration methods. For a large sparse system linear $$ Ax=b, $$ where $A$ is nonsingular, I know that ...
-1
votes
2answers
34 views

How to use natural logarithm inside Expression

I'm trying to evaluate the exact solution of heat diffusion in circular plate. I'm not able to use the natural logarithm inside expression. ...
0
votes
0answers
19 views

Truncated power series algebra implementation

1) I am looking for references for an efficient implementation and usage of TPSA. What sources exist besides Berz's 1989 original paper and the incomplete chapter in Dragt's book? 2) Are there ...
0
votes
0answers
36 views

What precautions should be taken when using 2D Perfectly Matched Layers?

I'm solving linearized Navier-Stokes equations with Perfectly Matched Layers in two spatial directions $x$ and $y$, but in the time-harmonic frequency $\omega$-domain, which is meant to be less ...
1
vote
2answers
67 views

FVM vs FDM vs Conservative form vs Non conservative form

My question is regarding solving the conservative form and the non-conservative form of the governing-equations (GE), like continuity or the navier stokes equation, using finite difference method (FDM)...
2
votes
1answer
97 views

Modified Equation and Stability for Centred Finite Differences for Wave Equation

I am trying to use the modified equation to derive the stability condition for the finite difference approximation $$ \frac{u(x,t+\Delta t) - 2 u(x, t) + u(x, t -\Delta t)}{\Delta t^2} = c^2 \frac{...
1
vote
0answers
19 views

Using nondimensionalization to solve an ode in MATLAB [duplicate]

I am trying to solve an ode that uses some extremely large numbers and some extremely small numbers, namely $$ e = 1.6\times 10^{-19}\\ E = 10^6\\ \tau = 6\times 10^{-24}\\ m = 9.1\times 10^{-31}\\ c ...
2
votes
0answers
29 views

Solving long time averaged chaotic nonlinear equations

I have a modified chaotic equation of the form: $$\frac{\partial u}{\partial t} = - (u+c)\frac{\partial u}{\partial x} - \frac{\partial^2u}{\partial x^2} - \frac{\partial^4u}{\partial x^4}$$ I am ...
2
votes
0answers
13 views

What is the correct way to calculate deviatoric stress tensor in lattice Boltzmann method?

Due to my previous question, where I asked about flux calculation in lattice Boltzmann (LB) method here, I have more or less same question for deviatoric stress tensor calculation due to pseudo-...
2
votes
1answer
26 views

How to store all solutions of an ODE on Matlab for multiple values of a parameter

I would like to solve an ODE for multiple values of the parameter p and most importantly, save all the solutions for all the different values. Till now, I have ...
6
votes
0answers
107 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 ...
2
votes
0answers
47 views

What is the fastest algorithm for computing log determinant?

I am diving into some literature to understand which is the best algorithm for computing the log-determinant of a PSD matrix. So far I have found the following two papers: Large-scale Log-...
1
vote
0answers
25 views

What kind of problem or matrices are suitable for multigrid method?

For Poisson or Convection-diffusion equation as follows: $$ -\Delta u=f,\qquad u|_\Omega = g. $$ or $$ -\Delta u +\vec{w}.\nabla u=f,\qquad u|_\Omega = g. $$ using FDM or FEM discretization, we can ...
-1
votes
0answers
11 views

Norm of mixed constant/cvxpy variable array in cvxpy

I'm trying to incorporate a norm in cvxpy of an array that includes a constant and a cvxpy variable. Looking at something like: ...
2
votes
1answer
60 views

MATLAB's ode45 not dealing with initial conditions well [RESOLVED]

*Concern highlighted in yellow *Solution at bottom I have a differential equation to solve for the motion of an electron: $$ \frac{d^2v}{dt^2} = \frac{1}{\gamma^6}\left( \frac{eE}{\tau m} - \left( \...
-1
votes
1answer
20 views

Plot sinewave on ZX axis [duplicate]

I am trying to plot a sinewave with a bit of 3d perspective along the ZX axis instead of the XY axis. I have so far been unable to get anything that works, and have been unable to locate any examples....
0
votes
1answer
37 views

A lot of identical staff in Comsol material database?

I got a lot of elements in Material Browser of Comsol Multiphysics of Optics section. ...
0
votes
1answer
50 views

Solving differential equation in Python with discretized variable coefficients

I am trying to solve a differential equation with discretized variable coefficients which are calculated from a time serie. In this case the Runge-Kutta step size is fixed by the frequency in the time ...
1
vote
0answers
34 views

Question regarding 1D implementation of the DG method

I'm pretty new to the DG method and have been writing a 1D code to help me understand the coding aspect. With respect a reference, I've been following these notes https://www3.nd.edu/~zxu2/...
1
vote
1answer
62 views

Why do not we choose the error solution norm as an iterative method's criterion?

For solving linear system $$ Ax=b, $$ using iterative mehods, we often use the terminate criterion as follows: $$ \frac{\|r_k\|}{\|r_0\|}=\frac{\|b-Ax_k\|}{\|b-Ax_0\|}<eps. $$where $x_0$ is the ...
1
vote
0answers
44 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 ...
-4
votes
0answers
26 views

Derive the Finite Difference equation corresponding to the steady state PDE. Explain how to implement Dirichlet and Neumann boundary conditions

A rod of length L = 1m, is made of copper, with thermal conductivity κ = 380W/m/K. A uniform heat supply h = 10kW/m3 is applied to the rod. The left boundary of the rod is kept at constant temperature ...
3
votes
0answers
61 views

Numerical integration with singularity term

In https://www.johndcook.com/blog/2012/02/21/care-and-treatment-of-singularities, the author explains the subtraction method to get rid of singularities when performing numerical integration. The ...
3
votes
1answer
124 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 ...
0
votes
0answers
33 views

Why does the initial guess for linear system usually choose by zero vector?

For solving linear system $$ Ax=b, $$ using iterative mehods, we often use the terminate criterion as follows: $$ \frac{\|r_k\|}{\|r_0\|}=\frac{\|b-Ax_k\|}{\|b-Ax_0\|}<eps. $$where $x_0$ is the ...
2
votes
3answers
103 views

Is there any other sparse matrix data in matlab built-in file?

I want to do some numerical examples solving large sparse linear system Ax=b. And I want to use some data from Maltab itself because this experiments are easily ...
4
votes
1answer
62 views

Is operation count a reliable predictor of performance when comparing two formulations?

I have two formulations to solve a problem (both give dense, complex and symmetric system). They are solved multiple times in a loop. I am trying to predict which is better to use. The first one ...
1
vote
0answers
18 views

Fitting a multivariate PDE (using Java)

I'm doing simulations of 2 coupled PDE's with Comsol Multiphysics. I want to fit some data (using the Application method, whose language is Java) to those simulations. In order to answer my question ...
0
votes
1answer
80 views

Why is modeling a physical system with ODEs sufficient?

I've read a few papers in dynamical systems where the model equations are sets of ODEs, with the state space, say, the spatial variables x, y, z, and an angle variable phi all evolving forward in time....
1
vote
1answer
67 views

Crank-Nicholson for diffusion-advection vs diffusion equation

Let's consider the following 1D diffusion equation: $\frac{\partial u}{\partial t} = xk \frac{\partial}{\partial x}(\frac{1}{x}\frac{\partial u}{\partial x})$ where we assume that the diffusion ...
1
vote
0answers
9 views

How to use RODFT00 and REDFT00

I have some difficulty in implementing RODFT00 and REDFT00. I want to use them for fluid simulations. I would really appreciate ...
1
vote
0answers
35 views

FFT convolution works only with certain domain length

in my quest to understand how I can use FFT to compute integrals (see my other question click, still no answer there), I came across the fact that a convolution of two functions can be calculated by ...
0
votes
0answers
30 views

DirichletBC definition on boundary subdomain for component of vector valued function in FEniCS

I am trying to impose a no-outflow condition for a velocity-field over a boundary sub-boundary domain in FEniCS. What I have find challenging is imposing the condition on a component of a vector-...
2
votes
1answer
48 views

How to set up a time-dependant matrix for an ODE to be solved using python?

I want to solve a problem numerically in python like this: $$ y(t)' = \mathbf{M}(t)y ,\\ y(0) = (1,0,0,0 ...) $$ where $y$ is an $n$-dimensional vector and $\mathbf{M}(t)$ is a time-dependant $n \...
3
votes
3answers
66 views

CPU usage when a MPI rank waits during a blocking communication

A typical way of dealing with I/O in MPI parallel programs is to either read all data to a single node and dispatch to the other nodes accordingly, or send all data to a single node and write from ...
6
votes
1answer
93 views

How fast is automatic differentiation?

I asked this question earlier on StackOverflow, but it's obviously better suited for SciComp: While there seem to be lots of references online which compare automatic differentiation methods and ...

15 30 50 per page