instruction stringlengths 43 28.1k |
|---|
I have a matrix of the form
And I would like to invert it. Currently I am using the lapack routines zgetrf and zgetri. I.e. I am performing LU factorisation.
My question: Are there any packaged routines (lapack or otherwise) that invert banded matrices? I have found routines for tridiagonal and block diagonal matrices... |
Modulus of a (discretized) function, $|f_h(x)|$, where $h$ refers to the mesh spacing, would, in general, have zeros, and those zeros would not necessarily lie exactly at the mesh points.
A naive abs call on such a function, abs(f_h), is a very bad representation of such a modulus.
This is especially relevant when a qu... |
I know that this is not really apart of the rules as this is a recommendation question and these don't really have an answer per say. But, like this forum posting: https://stackoverflow.com/questions/388242/the-definitive-c-book-guide-and-list. To be honest, I am not really sure where else to ask this question.
I would... |
I suspect that a function $f(x,y)$ is of the form $f(x,y)=a(bx+c)^{dy+e}$. I have access to several values of $f(x,y)$. How do I proceed numerically to find the parameters $\{a,b,c,d,e\}$?
By plotting $\log f$ versus $\log y$ for a fixed $x$, I would get a linear curve and this would give me hope to find $\{d,e\}$. But... |
The abscissas for Gauss quadrature are given by the zeros of the Legendre polynomials. The Legendre polynomials form an orthogonal set over $[-1, 1]$, and it is shown in (for instance) Kress that the zeros of a set of orthogonal polynomials give the abscissas for Gauss-type quadrature schemes.
Does this result hold in ... |
I'm trying to solve a problem where I have a initial and final distribution of tumor, and my goal is to find the best map of parameters (diffusion and reaction terms) for a reaction-diffusion equation, which explain at best the final distribution, knowing the initial one.
By doing some literature search, I figured out ... |
I am solving the Dirichlet problem
$$
\begin{cases}
\Delta u = 0, \\
u|_{\partial D} = f,
\end{cases}
$$
in a $2d$ domain $D$ using the finite element method. What I want to get is the normal derivative of the solution $u$ on the boundary: $\tfrac{\partial u}{\partial \nu}$. In other words, I'm interested in ... |
I am trying to solve the following equation
$ \partial_t g(x,y,t) = - v\left(\partial_x + \partial_y\right) g(x,y,t)$
using finite differences (here $v>0$). The equation is also solvable analytically, and every function of the form $g(x,y,t) = g(x-vt,y-vt)$ is a solution. So, an initial "shape" $g(x,y,0)$ will simply ... |
I want to achieve the following in 2D (and without obstacles):
Given start position A and end position B, generate the path between the two points that optimizes a cost function that depends on total length and overall smoothness. The one constraint is a tangential constraint (ie. velocity constraint) at point A.
For... |
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 declaration of memory and control over the use of the memory. But I am not really familiar with Fortran my question is then wh... |
I'm trying to code a parameter estimation for a reaction-diffusion problem. Namely, knowing the distribution of tumor density $u$ at time $0$ and $T_f$ ($u^0$ and $u^f$), what are the best distributions of the $k$ and $D$ parameters explaining the observed tumor evolution, assuming
$$\partial{u}/\partial{t} = D(x)u +... |
A sparse matrix $\mathbf{L}$ is formed by $\mathbf{L} = \mathbf{DKG}$.
$\mathbf{D}$ is a sparse matrix of size $m \times n$.
$\mathbf{G}$ is a sparse matrix of size $n \times m$.
$\mathbf{K}$ is a diagonal matrix of size $n \times n$.
$\mathbf{L}$ needs to be formed many times based on the updated diagonal entries of... |
I'm working on a problem in nonlinear elasticity, for which the external forces (loadings) depend on the displacements. Following Klaus-Jürgen Bathe's book "Finite Element Procedures", the virtual work is
\begin{equation}
\int_{{}^{t+\Delta t}V}{}^{t+\Delta t}\tau_{ij}\delta{}_{t+\Delta t}e_{ij}d{}^{t+\Delta t}V={}^{t... |
In Writing Scientific Software: A Guide to Good Style, several disasters are mentioned including a missle defence system which led to deaths at a US base in Saudi Arabia in 1991.
The error was caused due to catastrophic cancellation in tracking the incoming Scud missile's velocity, in order to fire a missile before it ... |
As stated in the title, it's said in the book that Gauss-Seidel iterative method is equivalent to successively setting each component of residual vector to zero. After rearranging G-S scheme, I got the following relation regarding the update of residual:
$$
r^{(k+1)} = U(D-L)^{-1}r^{(k)},
$$
but I still can't see why t... |
I am working on a problem (solid state physics, I am stripping all the details for brevity but if more details can help I'll elaborate) where I need to numerically calculate an integral of the form:
$$\vec{A}(\vec{r}) = \int_{\mathbb{R}^{3}\setminus E}\vec{B}(\lambda, \vec{r},\vec{w}) d^{3}w,
\quad
\vec{r} \in E $$
whe... |
I'm interested in finding a free online textbook that is an introductory textbook on numerical PDE for engineers. It should cover the basics of finite differences, finite elements, and Fourier series methods for very simple PDE cases, mainly the 1D heat and 1D wave equations, and should not be concerned with rigor, pro... |
We have a cylinder of length $l$ (in units of its radius $d,$ as basic unit of length set to $d=1.$) in a box, and we consider an orthonormal Cartesian coordinate system with its origin placed at the centre of the box. We know the position of the cylinder in terms of the coordinates of its centre of mass, so $\vec{R}=(... |
I'm writing a differential geometry library, and one minor convenience I'd like to offer is to generate a set of points on a surface given by a constraint. For example, for a sphere,
$$x^2+y^2+z^2-r^2=0.$$
Now, if it were an equation in two variables, I could step through one of them and then solve for the other, or ch... |
I am trying to solve a 1 Dimensional eigenvalue of poisson problem:
$$\nabla \phi ^2 +\nabla \phi = k\phi$$
with the boundary condition: $\phi (0)=0 , \nabla \phi(1) = 0 $.
I could solve this directly, but I am trying to solve it for parallel calculation framework by dividing the problems into 3 or 4 meshes. Then, I co... |
The common case of for instance a Monte Carlo simulation is, if we want to run our simulation for $N$ steps, we define a delta $\Delta,$ such that $N/\Delta = n$ tells us the frequency with which we measure/evaluate quantities of interest during the MC run.
For instance, say $N=1000,$ and we want to measure the averag... |
The central difference scheme:
$$\frac{d^2u}{dx^2}=\frac{u_{n+1}-2u_i + u_{n-1}}{\Delta x^2}$$
yields a tridiagonal coefficient matrix [1 -2 1]; As the number of points gets larger, this matrix becomes ill-conditioned. Yet this is a popular discretization. Why is this scheme so commonly used when it is prone to ill-con... |
As the title says, I am trying to code in FEM a plate structure that either has a hole in one of the layers or one of the layers is made of patches of plates, rather than one whole plate. However, while I have a slight idea of how to implement this, I'm really not very sure and I would like some questions answered befo... |
I have understood the stiffness matrix for 3D truss, and programmed Ku=f from scratch (in Java) to find the displacements.
Then I moved to 3D solid but lost in too many concepts and equations, such as shape function and so on. Books at hand: D. Hutton's Fundamentals of finite element analysis, O.C. Zienkiewicz's The f... |
I'm looking for resources on design patterns and principles for numerical software, potentially but not necessarily with a focus on object-oriented approaches to numerical codes.
I am aware of the text, Writing Scientific Software: A Guide for Good Style, but this still deals a lot with things like floating point issue... |
I want to compute a fast matrix-vector product using a matrix $T$ which has a peculiar quasi-Hankel structure. For example,
\begin{equation}
T_2=
\left(
\begin{array}{c|ccc|cccccc}
a & b & c & d & e & f & g & h & i & j\\\hline
b & e & f & h & 0 & 0 & 0 & 0 & 0 & 0\\
c & f & g & i & 0 & 0 & 0 & 0 & 0 & 0\\
d & h & i & j... |
I am currently programming a code to find the equilibrium function that satisfies the poisson equation in 2D. In order to do this I use finite difference methods and the discrete equation I want to satisfy is:
$$\frac{T_{j, i+1} + T_{j, i-1} + T_{j+1, i} + T_{j-1, i} - 4T_{j, i}}{h^2} = q_{j,i},$$
where $T_{j,i}$ is a ... |
I am currently solving PDEs using the finite volume method. The surface integrals of the equations that I am solving involves computing face gradients. The current algorithm that we use to compute face gradients is
$$\nabla\phi_{face}=\frac{1}{2}(\nabla\phi_L + \nabla\phi_R) - \boldsymbol{\hat{d}}(\frac{1}{2}(\nabla\ph... |
I would like to use Matlab's pdepe to solve this system:
$$ s_t =(sr)_x + s_{ xx } \\
r_t =(\frac{ A }{ B }r^2+s)_x + \frac{ A }{ -K } r_{ xx } $$
where $A$, $B$ and $K$ are constants. I need to solve this using MATLAB pdepe. The problem is the nonlinear term in my equation: I don't know how to treat the nonlinear par... |
With double precision, I get $\log(\exp(-3)+1)=0.048587351573741958$, which already has $4$ incorrect digits, and $\log(\exp(-30)+1)=9.348... \times10^{-14}$, which only has two correct digits.
What is the most elegant way to circumvent this? I tried a Taylor series of $\log(y)$ around $y=1$, but even with 14 terms I ... |
Following my previous question and its answer, after some reading of the advised books, I'm still confused about how to get the derivative of the functional to find the best parameter of my reaction diffusion problem.
In short, I need to find the best (time independent, space dependent) parameters $D$ and $k$ which min... |
This was a question on a past final that we can't figure out. Take the least squares system
$$\min_x ||Ax-b||_2\, ,$$
where $A\in\mathbb{R}^{mxn}$, $m<n$, and A is full rank. A has $\mathcal{O}(n)$ non-zero entries. Assume you only have $\mathcal{O}(n)$ computer memory.
Suggest an algorithm for approximating the solut... |
It is known that there exist a number of radioisotopes of elements commonly used in computer systems. Is the decay of these materials known to affect device performance over time, or is its impact so small as to be immeasurable?
This question occurred to me last night as a friend "cleaned the N64 cartridge" by blowing ... |
Single-component Euler equations are solved with finite-difference WENO methods very well. Now I'm trying to apply them to gas mixtures (with aim to reacting mixtures).
While searching for extension to multi-component equations, I find very little on finite-difference WENO methods for them, mostly there are finite-volu... |
You can find the description of the inertial partition algorithm either in [1] or [2].
I think, I understood the main idea behind this algorithm:
We have the spatial coordinates of points that we want to bisect. We find a line (or, hyperplane, in general) $L$ through these points, such that it is a total least squa... |
I have a problem as follows:
We have a set of circles (we know the radius r and the center point c in Rd of each circle)
We need to find lists. Each list contains circles that overlap and connect each other.
For example, we have 6 circles in 2D as bellows. We need to find two lists. The first list contains red, yello... |
What are the differences in parameters in the force field for MD simulation study of RIGID and FLEXIBLE ZIF-8 framework?Is the electrostatic interaction term present in the rigid one?
|
I would like first to state that it is beyond my capability to identify whether this is a BFGS issue or a R package problem.
I've been doing some mixed logit regression using the R package "mlogit". In total I have 32 random parameters and one fixed parameter to be estimated. Correlations are allowed among random param... |
Suppose we have a system of $N$ particles that interact via the Lennard-Jones potential $$V(r)=V_0\left[\left(\frac{r_0}{r}\right)^{12}-2\ \left(\frac{r_0}{r}\right)^{6}\right].$$ No other forces exist. The objective is to perform molecular dynamics simulations with this system.
I'm stuck on an important part. I do no... |
I want to compare a few solvers of partial differential equations. I need to include the computational time and the solution accuracy (compared to an analytical solution or something similar).
What kind of measures I could use?
|
Let's say I have two numbers $x$ and $y$ which I'd like to compare to see whether they are equal up to their first $N$ digits.
For instance $ 1.002 \approx 1.001$ and $1002 \approx 1001$ up to 3 digits.
Intuitively, this means that the difference of $x$ and $y$ should be $N$ orders of magnitude smaller than (say) $x$. ... |
It looks to me like a very common problem, yet I haven't been able to find any practical guide on the subject despite many hours searching.
Here is a clearer statement of my question:
I have a system of (linear) PDEs in the variables $x$ and $t$. I can use the method of lines to discretise the space coordinate $x$ whi... |
Suppose there are multiple intervals on $\mathbb{R}$, e.g., $[0,0.5]$, $[0.4,1]$, $[1.5,2]$, the union of them should be $[0,1]$ and $[1.5,2]$. Is there a specific datastructure (or algorithm) for computing such union?
A variation of this problem is to union intervals on cyclic domain, for example, angles from $-\pi$ t... |
I have a nonlinear Schrodinger equation which reads:
$$ \frac{1}{2} \frac{d^2u}{dx^2}+ |u|^2u + V(x)u = -i \frac{du}{dz},$$
where $V(x)=\cos(wx)+ i a \sin(wx)$ and $w$, $a$ are numbers.
How to solve its band structure, meaning its dispersion relation?
The plane wave expansion method is used for a real potential. Can i... |
I want to solve non-classic diffusion equation in Fourier space. The equation is $$∂c/∂t=-∇.J$$ Where $J$ is $$J= -M.∇μ$$ Where M is mobility. It depends on c and $\mu$ is $$ μ= g(c) - \nabla^2c $$ Now i am trying to solve above equation $$∂c/∂t= -∇.(-M.∇μ)$$ $$ =∇.[M.(∇(g(c)-∇^2 c))]$$ Now how to do Fourier transf... |
I've asked this question on stackoverflow 2 weeks ago, but, judging by zero response, that probably was the wrong forum. Therefore copying it here:
Let F0,...,Fn be functions with parameters p0,...,pn and G be a composite function. Say, for n=3 G(x)=F3(p3,F2(p2,F1(p1,F0(p0,x)))).
I'd like to globally optimize the par... |
The usual problem of graph partitioning is to split a graph (or a mesh) into two partitions.
According to its Github repository's README file, KaHyPar supports both recursive bisection and direct k-way partitioning.
I suppose that recursive bisection is just a recursive application on the partitions of a graph produc... |
In an nbody gravity simulation, instead of doing exact(all-pair brute force) solution, I added masses of each body into cells of a 3D grid(each cell is just a float value having a mass value). Then smoothed the grid using a stencil. Now I'm trying to get an approximation of point masses for point masses, from grid. I h... |
UPDATED
I've coded a multiparticle MD simulation in 3D. It is based on Langevin Dynamics, with random impulse and dissipation. I think the program works correctly now? I have attached the plots of kinetic, potential, and total energy. I believe that in the case of no Langevin Dynamics, total energy should be conserved ... |
Can we linearize $T^2$ When solving $T''_x+T''_y+aT^2=0$ by finite difference?
I solved $T''_x+T''_y=0$ in Matlab using a finite difference explicit scheme. But when there is a source term, I come up with a system of nonlinear algebraic equations and I can't solve it anymore.
Is there a better method for solving nonl... |
Simulated annealing is a useful technique for finding near-optimal solutions to combinatorial problems. I have found a lot of tutorials on implementing the basic algorithm, but miss a general guide as to how constraints are incorporated into the optimization.
I wonder if anyone knows any sources for advice or algorithm... |
What is this doing? Looks like the original eigenvalue problem is converted into generalized eigenvalue problems with different dimensions of collocation points. Can someone explain more about this?
eigs.m
% Linear combination coefficients for convergence test. The convergence of the
% combination is the same as the wo... |
I am trying to understand Dirichlet and Neumann boundary conditions in FEM and I wanted to know if my inference is correct. To articulate my understanding, lets consider a simple case of TE and TM propagation in rectangular waveguides.
In the case of TE ($E_z$=0 and $H_z$=$\phi$) and in the case of TM ($H_z$=0 and $E_... |
I am using projection method and P2/P1 finite element method to solve the incompressible Navier-Stokes equations while the mesh is constantly adapted as the body moves (edge swapping, splitting and collapsing is performed locally based on a certain condition). The velocity on the new vertex is interpolated locally.
Th... |
I read several introductory texts about potential flow and vortex lattice method. Basically, it is fitting of some velocity field described by conditions on velocity at some control points using basis functions placed in other points.
horse-shoe vortex:
In order to fullfill Helmholdz theorem that vortex filaments $\Ga... |
This particular FEM question concerns waveguides and FEM 3D simulation. To excite a waveguide with waveport (TE10 and so on), we typically have to solve for eigenvalues ($k$) of helmholtz equation using FEM 2D.$$ \bigtriangledown^{2}\phi_{2D}+k^{2}\phi_{2D}=0 ,\quad\phi_{2D}=E_{z}(TM)\quad or \quad H_{z}(TE)$$ Upon sol... |
In structural mechanics, are the boundary conditions "free surface," "Traction free", "stress free" all equivalent Neumann boundary conditions?
|
Suppose we have this simple optimization problem
\begin{align*}
\underset{x\in V}{\text{min}} &~ f(x) \\
\text{s.t.}& ~x \leq \beta
\end{align*}
Using slack variables
\begin{align*}
\underset{x\in V}{\text{min}} &~ f(x) \\
\text{s.t.}&~ x - \beta + s \leq 0 \\
& s \geq 0
\end{align*}
Lagr... |
I wanna ask a question that confuses me quite a long time. I saw many guys, in the context of computational mechanics, they seemed to choose the virtual functions or kinematics in a way that some kinematical quantities are kept/fixed zero, but they ask the remaining of them to act as roles during the derivation o... |
This is a follow up question to my question yesterday Structural mechanics traction boundary condition question
Does a traction free boundary condition also mean that the displacement gradient is 0 where the boundary condition is applied? My thinking is that it does not because it seems you can have traction free (zero... |
According to this paper the following finite difference approximation is third-order accurate:
$$\frac{d\rho_j}{dx}\approx\frac{2-\eta}{3}\frac{\rho_{j+1/2}-\rho_{j-1/2}}{\Delta x}+\frac{1+\eta}{3}\frac{\rho_{j-1/2}-\rho_{j-3/2}}{\Delta x}\text{, with }\eta=\frac{u\Delta t}{\Delta x}.$$
But I don't see how this is thir... |
I need to solve an integral equation in the form:
$$A(z)+\int\limits^{z_2}_{z_1}B(z') \frac{z^N}{z^N-z'^N} \frac{e^{i\beta}}{|z|}\mathrm{d}z'=0 $$
where $A(z)$ distribution is known and we are solving for $B(z')$ distribution and $z,z'$ are complex variables. I also know the value of $B(z_2)$.
Can anyone help me how I ... |
I feel like publishing some previous works from my PhD thesis. I was using Mathematica to build a system of 2N partial differential equations for 2N functions by symbolic spatial Taylor expansion, then numerically integrate them with NDSolve with respect to time.
Mathematica had a strange behaviour for some N orders, s... |
I'm running some simulation using FEM. In my model I need to apply a constraint condition to the governing equation. My governing equation similar to the diffusion equation as below:
$$\frac{\partial c}{\partial t}=\nabla(D\nabla c)\quad\text{on}\quad\Omega$$
and the flux is defined as follow:
$$-D\nabla c\cdot n=J$$
... |
I was asked to compute the Stokes flow (i.e. a low Reynolds fluid) near and obstacle. This is the first time I face a fluid and I am lost. What reference/general ideas/big theorems can you recommend me?
More details: given and obstacle (lets say, a bounded simply connected region $D\subset\mathbb{R}^2$ with $C^\infty$ ... |
Numba offers JIT for Python. In its documentation it says "One objective of Numba is having a seamless integration with NumPy."
So why including some of the simplest features from numpy isn't possible:
import numpy as np
from numba import *
@jit(nopython=True)
def testfun(x):
y = np.size(x)
return y
x=np.ar... |
As in title, which method is the most optimal for numerical calculating value of:
$\arg(z_1z_2\cdots z_n)$?
Method 1: one can first calculate $Z=z_1z_2\cdots z_n$ and then calculate $\arg(Z)$.
Method 2: using property $\arg(z_1z_2\cdots z_n) = \arg(z_1) + \dots +\arg(z_n)$
Or maybe something else?
|
Hi and thank you all again. I am solving the reaction-diffusion-advection equation as follows
$ \partial_{t} n\left(t,z\right) = -\partial_{z}\left(\Phi\left(t,z\right)\right) + p\left(t,z\right) -n\left(t,z\right)l\left(t,z\right)$
The terms $p\left(t,z\right)$ and $l\left(t,z\right)$ are computed according to big se... |
The stiffness matrix $K$ in a finite element analysis is a symmetric positive definite matrix. When we introduce essential boundary conditions, we remove rows and columns associated with prescribed displacements, for example. And we obtain a linear system of equations $\bar{K}\bar{X}=\bar{F}$ in which $\bar{K}$ is the ... |
If I have a set A constituded by $n$ 2-dimensional points, how can I find a $\sqrt{2}$-approximation diameter of A, that is the maximum Euclidean distance between any two points in A, in linear time?
Can you help me with this?
|
I trying to wrap my head of derivation of the analytic FEM Jacobian
for the Newton method. Say we have a nonlinear Poisson problem of the
(weak) form
$$ \int a(u)\nabla\ u\cdot \nabla v = \int f v $$
where $a(u)$ is a coefficient. From the derivation of the Newton
method the Jacobian matrix (in the Newton update $\Delt... |
I've been trying to design an algorithm for computing determinant of Big square Matrices (N <= 1000). I am allowed to use multithreading, but still, I can't design the algorithm. The assignment states, that I should use Gaussian elimination method. Yet, there are no input data, so the testing data is on me. For big mat... |
I want to find a candidate vector $B$ that
$$\min|(W - A_i * B_i)|$$
$$ a_i > 0,\ A_i=\{a_0,...,a_i\},\ B_i=\{-1,0,1\}^i$$
For example, given
$$W = 0.6,\quad A_4 = [0.1, 0.2, 0.4, 0.7] $$
one of answer will be
$$B_4 = [1, -1, 0, 1] $$
I only get that by searching an entire tree (DFS, BFS).
I tried with a ternary tree,... |
I am looking for reference on how to implement nonlinear boundary conditions. Specifically, I am interested in implementing a radiation boundary condition for heat transfer with the FEM:
$-k \frac {\partial T} {\partial n} =F (T^{4} - T_{\infty}^{4})$
with $T$ temparature, $F$ is some factor, $k$ the thermal conductiv... |
We know finite difference method (FDM) can replace $y''(x)$ as $\frac{1}{h^2}[y(x+h)+y(x-h)-2y(x)]$ or so. One naive way to write down the matrix of the differential operator is like the following, which somehow simply cuts off at the two edges. Similarly, we can write the matrix for $y'=\frac{1}{2h}[y(x+h)-y(x-h)]$ as... |
I am computing the stationary, incompressible, inviscid and irrotational flow around a circular cylinder using a discretization in general coordinates.
I derived a PDE and proper boundary conditions in the physical domain (left image) given by $G := \{(x_1,x_2 : R_1^2 \leq x_1^2 + x_2^2 \leq R_2^2, x_2 \geq 0\}$. This ... |
For the linear system $\mathbf A \mathbf x = \mathbf b$ generated from 2D Poisson equation using the standard central finite difference method,
$$
\mathbf A =
\begin{bmatrix}
\mathbf K & -\mathbf I \\
-\mathbf I & \mathbf K & -\mathbf I \\
& -\mathbf I & \mathbf K & -\mathbf I \\
& & \ddots & \ddots & \ddots
\end{bmatr... |
The general solution to the 2nd order wave equation:
$$\frac{d^2u}{dt^2} = c^2\frac{d^2u}{dx^2}$$
is known as d'alembert's formula->https://en.wikipedia.org/wiki/D%27Alembert%27s_formula
Does an analytical particular solution exist for a problem with a Neumann BC on one end, and dirichlet on the other? I am unable to f... |
Time is continuous time. I have a 3D state space, and transition rates across all of these.
Using the transition rates, I can compute a generator matrix A associated with the markov process. My A satisfies all requirements on a generator matrix:
A_ii < 0 and A_ij >=0 for all i and j
Also, rows sum up to zero.
I w... |
$$
\text{Let}\\
A, B \in \mathbb{C}^{n \times n} \text{ and } \hat{\alpha}, \hat{\beta} \in \mathbb{C}^{n}, \hat{f} \in \mathbb{C}^{2n}
\\
\text{Find }\\
\underline{\mathbf{x}} \in \mathbb{C}^{2n} \text{ such that}\\
\begin{bmatrix}
A & -B\\
\hat{A} & \hat{B}
\end{bmatrix}
\cdot
\underline{\mathbf{x}}
= \hat{f}\\
\ha... |
The coupled mode space NEGF method for computing transistor characteristics involves expanding the electronic wavefunction in a mode space basis
$$\Psi(x,y,z) = \sum_n\phi_n(x)\xi_n(y,z;x)$$
where $\xi_n(y,z;x)$ is the nth mode at position x (the x dimension being the direction of transport).
The method involves comput... |
I use arpack to solve the 2D Schrodinger, and eigenvalue problem of the form
$$Hx = \epsilon x$$
on a uniform grid. All eigenvectors are real in my case.
Arpack doesn't normalise the eigenvectors, and phases between the eigenvectors will differ (some are multiplied by -1, some aren't).
Normalising the eigenvectors afte... |
I'm trying to build a numerical solution for a parameter estimation problem of reaction-diffusion equation, using the adjoint method.
To summarize it, I'm trying to minimize the function
$$ G=\frac{1}{2}\int_\Omega{(u(T,x)-u_f)^2d\Omega} + \frac{1}{2}\int_\Omega{D^2d\Omega}+ \frac{1}{2}\int_\Omega{k^2d\Omega} $$
subje... |
The following problem is given:
$$ - \bigtriangleup u = f, \quad \partial_n u = g \quad \text{on } \Gamma_N, \quad u = 0 \quad \text{on } \Gamma_D $$
with $\Gamma_N$ or $\Gamma_D$ denoting the Neumann/Dirichlet boundary.
I am currently having a look at a residual error estimator using the Clément-Interpolant.
There wa... |
I am working on developing my own solver(for implementation on hardware), based on IPM for following problem:
\begin{equation}
\begin{split}
\min_{X} \; \frac{1}{2}&\|X\|_F^2 + trace(CX)\\
\text{s.t. } & trace(AX)\leq b\\
& X\succeq 0\\
\end{split}
\end{equation}
As a reference I already know how to obtain KKT equati... |
I am currently using the following three methods to solve differential equations:
4th order Runge Kutta Method
Euler Method
Internal scipy methods:
scipy.integrate.odepack
#odeint
I am aware that eulers method is first order, with a total error after N steps being O(h) (I think).
And that RK4 is 4th order, hence its n... |
I am trying to compute the Ising model for NiO. As O carries no magnetic moment, I only need to consider the case of Ni which requires a second nearest neighbour Ising model. As can be seen in the figure below, the Ni atoms interact with the their nearest neighbours with a coupling constant J1 = 2.3 meV and their secon... |
Assume some basic knowledge of numerical methods for PDEs, acquired through A. Quarteroni's Numerical models for differential problems.
I'm looking for a reference to get started on the analysis of PDEs and modeling for industrial problems and related computational approaches (with sample Matlab code available to illus... |
Given two Hilbert spaces $X$ and $Y$ and $a \colon X \times X \to \mathbb{R}$ as well as $b \colon X \times M \to \mathbb{R}$, both being continuous bilinear forms with $a(\cdot, \cdot)$ being symmetric and coercive for all $v \in X$. $f \in X'$ and $g \in M'$.
I am worried about the proper connection between the minim... |
I want to solve the following system via Matlab
$\Omega=(0,1)^2$
$$\Delta y=\frac{1}{\alpha} p$$
$$ -\Delta p= y -1 $$
$$p|_{\partial \Omega}=0,~y|_{\partial \Omega}=0$$
using
n=50;
alpha=1;
A=gallery('poisson',n);
K=[A -1/alpha*speye(n^2);
speye(n^2) A];
b=[zeros(n^2,1) -ones(n^2,1)];
... |
I have an ODE system of the general form
y' = k(y)(x) + q(z)(x)
x' = a(z)(x) + b(x)(x)
where k,q,a and b are also dependent on the states x and y. The solver(ODEINT) is throwing the error: "Max number of iterations exceeded. A new step size was not found". I am using the Rosenbrock method on a stiff system. Is th... |
I a solving the 2d steady state convection-diffusion problem on the famous flow around a cylinder in rectangular domain benchmark. My numerical results show that with Q1 finite elements, the solver is converging for Pe=5000, whereas with Q2 discretization, the solver fails to converge. What can be the reason for poor ... |
I am trying to implement an incremental projection method for the 2D incompressible Navier-Stokes. The type of projection method I am trying is
$$
\frac{u^{*} - u^{n}}{dt} = - \nabla p^{n} - u \cdot \nabla u + \nu \nabla^{2} u\\
u^{*}|_{\partial D} = u^{n+1}|_{\partial D}\\
\nabla^{2} \phi^{n+1} = \frac{\rho}{dt} \nab... |
I have been learning about the impact of cache size on code performance. I wrote a small code to see how using a column major loop in MATLAB would be better than using a row major loop, since MATLAB stores matrices in column major like FORTRAN. I also compared against MATLAB's internal multiplication routine. Here is t... |
I am using Python but I wouldn't mind changing language. All I have gotten from my research are tools to count the number of (lattice) points inside a region given the equations for the planes that enclose it. Other tools are made to optimize a given function inside the polytope (linear programming).
How about finding ... |
What are the differences between MA57 and HSL_MA57 solvers? I'm in an optimization class that will make use of symmetric indefinite factorizations, and I'm trying to learn about the distinction between these two. I know that MATLAB uses the MA57 solver but am unsure of the differences beyond this. Thanks!
|
I am dealing with a integral equation
$$ f'(t) = -\int_0^t K(s) f(t-s)\quad t\in [0,t_\max] \tag{1}$$
in which $f(t)$ and $f'(t)$ are known, well-behaved functions of $t$ and $K(t)$ is the unknown. In addition, the physics of the problem dictate that $f(t)$ and $K(t)$ are even about $t=0$. I have discretized this equat... |
I'm developing a finite volume solver for the simple twodimensional advection equation with constant velocities $u, v$ and constant mesh spaces $\Delta x$:
$$ \frac{\partial \rho}{\partial t} + u \frac{\partial \rho}{\partial x} + v \frac{\partial \rho}{\partial y} = 0$$
where $u,v > 0$.
According to this lecture, the ... |
Is it possible, in general, to combine hydrodynamical motion and expansion of material with, say, a finite difference time domain method to simulate light-matter interaction?
If so, how is this done in practice? I guess you would need some kind of operator splitting scheme. If you know more about it, can you suggest me... |
I am looking at an optimization problem that looks like this:
$$
\text{minimize}\;\; \mathbf{x}^TQ\mathbf x \;\;, \; \mathbf x \in \mathbb R^n, x_i \in \lbrace 0, 1 \rbrace\\
\text{subject to}\;\; ||\mathbf x||_1 = m < n
$$
In words, the goal is to select a fixed number $m$ of elements from $\mathbf x$ that minimizes ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.