Most Popular

1500 questions
7
votes
1 answer

Schroedinger/Diffusion equation with Crank-Nicolson in Python/SciPy

I tried to make the question as detailed as possible. I have an extremely simple solver written for the Schroedinger equation but with imaginary time, which transforms it basically into the diffusion equation (with a potential term). The method is…
hadsed
  • 273
  • 2
  • 9
7
votes
4 answers

computing the determinant of a dense nonsymmetric 100x100 matrix having very big and very small eigenvalues

The motivation for my question is the following: in one of Project Euler questions there is a need to count the spanning trees of a rectangular grid graph of dimension 100x500. By the Matrix-Tree theorem this number is equal to the determinant of…
John Donn
  • 223
  • 2
  • 5
7
votes
5 answers

How to solve block tridiagonal matrix using Thomas algorithm

Thomas algorithm can be used to solve a tridiagonal matrix: $$ \begin{bmatrix} {b_ 1} & {c_ 1} & { } & { } & { 0 } \\ {a_ 2} & {b_ 2} & {c_ 2} & { } & { } \\ { } & {a_ 3} & {b_ 3} & \ddots & { } \\ { } & { } & \ddots &…
xslittlegrass
  • 345
  • 1
  • 2
  • 8
7
votes
4 answers

Testing for stability of a simulated dynamical system

Background and question I often work with simulations of dynamical systems and I usually track a single parameter $x$, such as the number of agents (for agents based models) or the error rate (for neural networks). This parameter usually has some…
7
votes
3 answers

Krylov Subspace Methods for Dense Systems

I am currently researching on the viability of using KS methods for solving large dense systems. What I wish to prove (or disprove) is that methods like CG, BiCG and QMR are as good (if not better) than the generic LU or QR decomposition methods in…
Inquest
  • 3,394
  • 3
  • 26
  • 44
7
votes
3 answers

3d Ising model simulation - what critical exponents should I be looking for and how do I find them?

For the final project in my computational physics class, I've built and will be presenting results for monte carlo simulations of phase transition in the three dimensional ising model. Using the metropolis algorithm, I've been able to graph the…
Ami
  • 241
  • 1
  • 4
7
votes
1 answer

How does positivity preservation fit into the implication chain from monotone to monotonicity preserving?

I know from "Numerical Methods for Conservation Laws" by Randall J. LeVeque that there is an implication chain of properties of methods for conservation laws: monotone $\Rightarrow$ $L^1$-contractive $\Rightarrow$ TVD $\Rightarrow$ monotonicity…
Anke
  • 368
  • 1
  • 7
7
votes
2 answers

State of the art climate models

What are some of the state of the art models for climate simulation? I'm looking for downloadable source codes. For example in meteorological research I'm personally familiar with WRF, the Weather Research Forecasting model developed by NCAR (among…
MRocklin
  • 3,088
  • 20
  • 29
7
votes
2 answers

Confusion related to convex optimization

I have been reading about convex optimization. We have: minimize $f(x)$ s.t. $h(x) = 0$, $g(x) \le 0$, $x \in X$ It's Lagrangian dual is: maximize $\phi(\lambda,\mu)$ s.t. $\mu \ge 0$, where $\phi(\lambda,\mu) = \inf[f(x) + \lambda' h(x) + …
user34790
  • 473
  • 1
  • 3
  • 8
7
votes
2 answers

Left and right eigenspaces of the product of Gramians

I solve the Lyapunov equations : $$ A W_C E^T + E W_C A^T + B B^T = 0 $$ $$ A^T W_O E^T + E W_O A + C^T C = 0 $$ to obtain $ W_C $ and $W_O$. My aim is to get the left and right eigenspaces of $W_C W_O$. This is basically for model order reduction…
Milind R
  • 607
  • 5
  • 16
7
votes
1 answer

Algorithm for dealing with medium-size non-convex QCQP

I have the following problem in $x \in \mathbb C^{205}$ $$\displaystyle\min_{x}x^HAx$$ subject to the following constraints $$x^HBx = 1$$ $$x^HC_ix = 0$$ for $i \in \{0,1,\dots,203\}$, where $A$ and $B$ are complex $205 \times 205$ matrices and can…
Costis
  • 1,330
  • 11
  • 18
7
votes
2 answers

Numerical investigation of stability of motion (confinement)

I am trying to find the required specifications of a RF trap, in which a proton can be confined.(trap dimensions, voltage frequency and amplitude used, etc). I have to solve the equations of motion numerically because the potential doesn't have a…
Mostafa
  • 249
  • 2
  • 11
7
votes
1 answer

Decreasing spectral radius

I have a $4\times 4$ matrix and I want to use Jacobi iteration on it. Right now the spectral radius is higher than $1$. I know that the method is guaranteed to converge if the matrix is diagonally dominant. I can't do any reordering that would make…
Honza Brabec
  • 171
  • 3
7
votes
1 answer

Compressible flow through a porous medium with a variable inlet concentration

I'm trying to solve the transient behaviour of a compressible flow through a porous medium (porosity is $\epsilon$) where the fraction of B in A ($ \phi$) changes with time. The equations that I found are the following: continuity: $\frac{\partial…
Ruben
  • 71
  • 2
7
votes
4 answers

How to code in Matlab: If an argument is empty, then default to "x" value?

I have a function with a number of arguments, but some of them are optional. 1.) If when the function is called, some are left empty, how do I code it so that it defaults to a specific value? 2.) What if of 5 arguments, 3 are optional, how can the…
TheRealFakeNews
  • 593
  • 1
  • 4
  • 16