instruction stringlengths 43 28.1k |
|---|
There are generic methods for solving systems of ODEs numerically. Are there generic methods for PDEs? If so, what are they? If not, why not? To elaborate...
Any set of ODEs can be written in standard form as a set of n first order ODEs in n variables. A single method can then be used. The number of boundary/initial co... |
I am trying to do integrals of the type
$$
\int d^3\vec{p} \int d^3\vec{p}' e^{-p^2} e^{-{p'}^2}f(\vec{p}, \vec{p}')
$$
where $\vec{p}$ and $\vec{p}'$ are three dimensional vectors represented using spherical coordinates, $\vec{p} = \{p,\theta,\phi\}$, and $f$ is a non-trivial, potentially complex, function. The integ... |
I have a python implementation of calculating the partial trace over select dimensions.
def partial_trace(rho, keep, dims):
"""Calculate the partial trace
Parameters
----------
ρ : 2D array
Matrix to trace
keep : array
An array of indices of the spaces to keep after
being tr... |
Given a fat matrix $B \in \mathbb{C}^{n \times m}$ (where $m > n$) with full row rank, I would like to find (numerically) a full-rank matrix $A$ that minimizes the Frobenius norm of the product $A B$. Formally,
$$\underset{A \in \mathbb{C}^{n \times n}}{\text{minimize}} \quad \frac{1}{2} \|AB\|_F^2 \quad \text{subjec... |
I have a time dependent data set where each frame corresponds to a certain date. I need to show the time annotation, much like what Annotate Time Filter does, but show the date instead of time as a float value. How can I do that?
In python I can convert the time index to a date with datetime for instance:
init_date = d... |
Every real matrix $A$ can be reduce to real Schur form $T = U^T A U$ using an orthogonal similiary transform $U$. Here the matrix $T$ is quasi-triangular form with 1 by 1 or 2 by 2 blocks on the main diagonal. Each 1 by 1 block corresponds to a real eigenvalue of $A$ and each 2 by 2 block corresponds to a pair of comp... |
I would like to determine the number of negative eigenvalues (inertia count) of the $(N \times N)$ symmetric real matrix $K - \sigma M$, with $K$ a positive-definite sparse matrix and $M$ a positive-semidefinite matrix such that $M = Z Z^T$ with $Z$ a dense $(N \times r)$ full column-rank matrix, $r \ll N$, $\sigma > 0... |
I'm trying to solve aerodynamics of whole aircraft by vortex lattice method (or deeper here). The problem is that sometimes trailing vortex filaments from Horse Shoe Vortexes of main wing hits panels of rudder/elevator which leads to singularities (infinite coupling between the two panels).
Is there good way to damp t... |
My question concerns a specific statement in this paper:
N. N. Schraudolph and T. Graepel, "Conjugate Directions for Stochastic Gradient Descent," in Int. Conf. Artificial Neural Networks, Berlin, 2002 pp. 1351–1356. The preprint is available here.
Schraudolph and Graepel address the problem that in stochastic setti... |
I have a situation where I'm interested in solving the same ODE many times, from different initial locations. More precisely, I'm interested in solving an ODE of the form
\begin{align}
\frac{dx}{dt} &= f(x) \\
x(0) &= a \in \mathbb{R}^n
\end{align}
where I know that this ODE has a $T$-periodic orbit $\mathcal{A}$, i.e ... |
I'm trying to solve this equation (Windkessel equation) numerically as:
$$C \frac{d P}{d t} + \frac{P}{R} = Q(t)$$
Where $C$ is compliance, $R$ is resistance, $P$ is pressure, and $Q(t)$ is a known input signal (i.e. volumetric flux). I tried explicit (i.e. Forward Euler Method) as well as semi-implicit (i.e. Backward ... |
Lets say that one has a scalar field defined in 3D space for whose gradient he wants to find the Morse-Smale Complex for later performing an integration of several hexa-dimensional functions over attractor domains. The functions to be integrated are mostly concentrated around the attractor with relatively small contrib... |
I want to solve the time-dependent Schrodinger Equation using the Crank-Nicolson scheme. I end up with the following matrix equation
A_fixed = ... # the matrix that does the finite difference method
B_fixed = ... # the matrix that does the finite difference method
A = A_fixed - diags(V) # Add the potential term V to... |
I want to see tetrahedron volumes generated from STL meshes in ParaView (5.5.2).
From a given STL (simple cube, for example), I can generate a volume mesh using gmsh, and export it as .vtk UnstructuredGrid.
When I open it with notepad, I can inspect that its properly generated, with all the surface and volume elements... |
I am trying to solve a set of coupled, nonlinear ODEs. The only dependent variable is a 1-dimensional spatial coordinate, let's call it $x$. For now, I've managed to approximate away some of the coupling between the equations, such that the first one doesn't depend on the second one at all. I solved it with FEM without... |
1) Which approach from the following approaches "a" and "b" is used while performing crossover?
a) By selecting any 2 parents randomly from selected population, crossing them, forming just TWO offsprings, adding them in population and throwing out just TWO least fit individuals.
Thus, here, the new generation will hav... |
I have an application that is somewhat similar to the situation of computing Gaussian quadrature nodes and weights: simply put, I need to compute the eigenvalues and the last two (normalized) components of the eigenvectors of a symmetric tridiagonal matrix.
I am aware of the Golub-Welsch scheme that uses the implicit Q... |
I am interested in solving the following semidefinite optimization problem:
\begin{equation}
\begin{split}
\underset{X,\lambda}{\rm maximize} \;\;\;\;&\lambda^Tc \\
&-\mathbb{I} \le X \le \mathbb{I} \\
&X - \sum_{k=1}^m \lambda_k A_k \ge 0,
\end{split}
\end{equation}
where $\lambda,c \in \mathbb{R}^m$ and $X,A_k$, for ... |
Suppose I want to solve
$$\text{arg min}_x \frac{1}{2}\|\tilde{A}x - b\|_2^2 + \frac{1}{2}\|x - c\|_2^2$$
where $A$ is a wide sparse matrix and $\tilde{A} = A C_n = A (I - \mathbf{1}\, \mathbf{1}^T/n)$ is the "centered" version of $A$, typically non-sparse. [1]
If I am willing to materialize $\tilde{A}$, I know severa... |
I use interval arithmetic for reliable computing. Now, a procedure coded in a good implementation of interval arithmetic takes perhaps about eight times as much as the same procedure carried out without interval arithmetic (if the lion's share of runtime is taken by floating-point computations). I have sometimes been a... |
I am trying to find the diffusion coefficient ($D$) and the partition coefficient ($KLP$) using experimental data of desorption of a pollutant from a film into a liquid. This process can be modelled, under certain assumptions, following Fick's law (related question here for more details on the model)
I am using Matlab... |
I want to resolve numerically this equation using of difference finite method with Leapfrog Scheme
$$\frac{\partial{u}}{\partial t}+ v \frac{\partial{u}}{\partial x}= 0 $$
I'm trying to write a code that resolves that PDE wit $v=1$ in leapfrog scheme (http://www4.ncsu.edu/~zhilin/TEACHING/MA584/Chapter5_fd_fem.pdf page... |
I asked a question on Stack Overflow Performance Issue with VP Trees and Nearest Neighborsand I was not satisfied with the answer and so I thought I would reword my question for this site and post this question as a computational science question.
I am using the VPTree to store the coordinates of my sparse array as da... |
SU2 is an open-source CFD suite that is built around a RANS-solver. The main PDE that is solved, is the following:
$$
\frac{\partial}{\partial t} \mathbf{U} + \nabla \cdot \mathbf{F^c} - \nabla \cdot \mathbf{F^v} = \mathbf{Q} \qquad \mathrm{in}\ \Omega, t > 0
$$
In this equation, $\mathbf{U}$ is the state vector and $\... |
I am comparing the run-time of two algorithm by solving different instance of the problems. Sample of my data:
problem_id | algo_original_time | algo_improved_time
---------------------------------------------------------
prob_01 | 0.56 | 0.036
prob_02 | 0.26 | 0.005
pr... |
I am trying to visualize a higher dimensional vector field. Is there a way to do this. I asked this question here, I was told to post it here.
As an example, one can use
$$\begin{eqnarray}
\dot{x}&=& \left(J-R\right)x
\end{eqnarray}$$
where $x\in \mathbb{R}^5$ $J $ is a skew-symmetric matrix and $R$ is a positive... |
This is a continuation of the question asked here. I want to solve numerous least squares systems of the form
$$
D_i A x \approx D_i b
$$
where $D_i$ are $m \times m$ diagonal matrices with positive elements on the diagonal, $A$ is $m \times n$ with $m > n$, $x$ is $n \times 1$, and $b$ is $m \times 1$.
The answer give... |
While playing around I managed to design a Cellular Automaton (CA) that behaves like a fluid. Very basic behavior, like diffusion, obstacle avoidance, pressure etc. And that got me wondering about it. Designing by hand doesn't seem like the way to go; is there any work that tried to explore the rule space using other m... |
I have research work where I need to compute a matrix inversion. The matrix has a size $31300\times31300$. I am using a universal java matrix package to invert this matrix. But as the dimension of the matrix is huge, it throws error memory out of scope. Cpu cannot allocate huge memory space.
So, to find out a solution ... |
I try to implement some big matrix inversion. My system configuration is Hardware:- Memory: 62.8GiB, Processor: Intel Xeon(R)CPU E5-2670 v3 @2.30GHZ*48 To implement matrix inversion I am using universal Java matrix package. I want to invert a 31000*31000 dimension matrix. It is a Sparse matrix, most of the cell of this... |
When I open U for example, I find:
dimensions [0 1 -1 0 0 0 0]
That means m/s
What are the other dimensions?
|
For learning purposes, how do I create an scalar variable like temperature divided by 2 and outputs it on files generated?
|
In Yurii Nesterov's Introductory Lectures on Convex Optimization, there is a description of the rate of convergence and corresponding upper bound for the analytical complexity of a minimization problem:
$$\min f(x),\quad x \in \mathbb R^n$$
The error at iteration $k$ is denoted by $r_k=||x_k-x^*||$ where $x_k$ is the ... |
I am trying to implement the Thomas algorithm using OpenCL.
__kernel void thomas(__global float *a_d, __global float *b_d, __global float *c_d, __global float *d_d, __global float *x_d,
__local float *shared, int system_size, int num_systems, int iterations)
{
int thid = get_lo... |
I need to put $N$ spheres with given radius $R$ randomly in a Volume $[-0.5,0.5]^3$, without any overlap of spheres.
If I choose values so that all the spheres will occupy ~57% of the total volume, I find it difficult to get results.
The basic scheme to place the $i$-th particle after $i-1$ particles have been placed:
... |
Analytical
Inside the box, the wavefunction is:
\begin{equation}
\frac{\hbar^2}{2m} \frac{d^2 \psi(x)}{dx^2} = E \psi(x) \iff
\frac{d^2 \psi(x)}{dx^2} = k^2 \psi(x)
\end{equation}
where $k = \frac{\sqrt{2mE}}{\hbar}$. Outside the box:
\begin{equation}
-\frac{\hbar^2}{m} \frac{\partial^2 \psi(x)}{\partial x^2} = (E ... |
When a timestep $h$ is rejected using a Runge-Kutta pair, such as Dormand–Prince, the algorithm resumes from the same initial point $t$ with a smaller timestep. A different idea is to resume at an intermediate point $t + kh$ where $1/7 < k < 4/5$, using the 4th order interpolation. The estimated error would be tested a... |
Existing algorithms for solving ODEs handle functions $\frac{dy}{dt} = f(y, t)$, where $y \in \mathbb R^n$. But in many physical systems, the differential equation is autonomous, so $\frac{dy}{dt} = f(y)$, $y \in \mathbb R^n$, with the $t$ left out. With this simplifying assumption, what improvements can be seen in exi... |
I want to implement a Bilinear Finite Volume discretisation of the anisotropic diffusion problem:
$$\frac{du}{dt} = \nabla \cdot (\textbf{D} \nabla u)$$
Both my degrees of freedom as well as the Diffusion Tensors are given on the vertices of my quadrilateral grid. I can, therefore, use bilinear test/trialfunctions on e... |
I have a linear system of complex numbers. I am using LAPACK' zgesv (actually I am using intel MKL LAPACKE, but I am assuming the algorithm is the same). No assumption can be made about the system.
I tried to follow its subroutine calls, but I got lost. What algorithm does it use, how many operations will be needed acc... |
I'm trying to solve this advection-diffusion equation (ADE):
$$\frac{\partial \phi}{\partial t} + \nabla \cdot (-D \nabla \phi + \mathbf{u} \phi) = 0$$
In fact, this ADE framework is coupled to a Navier-Stokes (NS) solver and I get velocity field ($\mathbf{u}$) from NS solver. My question is about ADE boundary conditio... |
I'm trying to implement a model I found in a paper, but there is something I do not understand. The authors say they use TDMA to solve their equations; however, they use a 3rd order upwind biased approximation to discretize the convective terms. This leads to an almost tridiagonal matrix (with coeff. for the terms $i-1... |
I have a question for the format of Schrodinger equation
$$\psi(x,t) = \int_0^\infty c_n e^{-iE_nt/\hbar} \psi_n(x)$$
Why do we have $i$ instead of $-i$?
|
For teaching purposes I'd need a continuous function of a single variable that is "difficult" to approximate with polynomials, i.e. one would need very high powers in a power series to "fit" this function well. I intend to show my students the "limits" of what can be achieved with power series.
I thought about concocti... |
I understand that the function applyrule uses patmatch to identify patterns and apply transformations accordingly.
Suppose, I want to write a rule for transforming spatial derivatives along $z-$direction of field components $E_i(x,y,z)$ to momentum space, so that:
$\partial_{z}(E_i(x,y,z)) \to -ikE_i(x,y,z)$.
I trie... |
I have come across an optimization problem with the following objective function:
$$f(x_0,y_0,z_0,x_1,y_1,z_1,...,x_N,y_N,z_N) = \sum_{i=0}^N f_i(x_i,y_i,z_i, \alpha(x_{i+1}-x_i) + \beta(y_{i+1}-y_i))$$
i.e. the objective function is the sum of the functions $f_i$ that only depend on three variables $x_i,y_i,z_i$ and o... |
The discussion in How does density functional theory scale with system size? already tells, how DFT scales with the number of electrons.
I want to simulate some clusters, so the simulation cell contains much vacuum and its size can be changed without affecting the number of electrons.
I know that with a larger cell le... |
I'm interested in running Hartree-Fock calculations on single atoms for a project, and I was trying to find more information about how to actually run them instead of just derivations of equations. Most of what I've found involves simulating molecules, but since I just want to do single atoms, can I use the hydrogen wa... |
I want the eigenvalues of the following generalized eigenvalue problem:
$$ Av = \lambda M v $$
where
$A\in\mathbb{R}^{n\times n}$ is sparse, symmetric, and positive semi-definite
$M\in\mathbb{R}^{n\times n}$ is sparse, symmetric, and indefinite (i.e. neither positive nor negative definite)
I want the eigenvalues $\l... |
Imagine a simple triangular base mesh in finite element method with an unknown number of elements (varying by the user). How can connectivity matrix be coded to be generated automatically?
|
Can someone recommend the best way to solve a least squares fitting problem with B-splines, with additional equality constraints? I want to solve:
$$
\min_x || b - A x ||^2, \textrm{subject to: } C x = d
$$
where $A$ is $m \times n$ and $C$ is $p \times n$. Specifically I want to fit B-splines and force the first deriv... |
I am trying to simulate a robot manipulator dynamics in SciLab.
Basically, I generated a step function that has constant acceleration for half of the time and then the same acceleration but negative for the other half, so I get a smooth transition between the manipulator positions.
This code generates the velocity and ... |
I simply want to solve the elliptic equation:
$$
-\kappa \nabla^2 u + u = f
$$
where $f\in [0,1]$. When using continuous Galerkin with Lagrange elements, I have noticed that $\kappa$ has to be greater than a certain value related to the mesh resolution to avoid values of $u$ under 0 or over 1. I would like to avoid the... |
You can set the Absolute or Relative ODE solver tolerances in Matlab with the options structure from an odeset command. But how do I find the default values for the different ODE solvers?
|
I have a nonlinear function fun with n inputs and n outputs. I also have a function jac which calculates the Jacobian, which is sparse. Which SciPy method, if any, can I use to find the root of fun?
I am surprised that I can't find a method in scipy.optimize that takes a Jacobian in sparse matrix format. But I believe... |
I'm interested in solving a differential equation in which I don't know the analytical form of the right hand side, I only know its numerical value for a finite set of values of the independent variable:
$$\frac{dy}{dx}=f(x_i).$$
I haven't found a library that allows me to solve this problem and I want to make sure if ... |
I was doing my research/project using WENO as the limiter in finite volume methods to solve hyperbolic conservation law. I have no idea why the result in the characteristic wise method has a big error compared to component-wise. This is my current solution that I get from my solver, it shows that there is a numerical i... |
I am trying to attain the Moore-Penrose pseudoinverse of a very large, very sparse, rank-degenerate, singular, and square matrix. ($75000 \times 75000$, near rank). The matrix is a graph Laplacian and I need to find the resistance distance between a large number of nodes (LU determinates are too slow). I realize the in... |
I am trying to solve a particular form of the Euler / Navier-Stokes equations in 1D, with very strong and non-linear diffusion coefficients.
My system of equations is
\begin{cases}
\frac{\partial n}{\partial t} + \frac{\partial}{\partial x}\left(nv \right ) = S_n\\
\frac{\partial \left( ... |
I have a cube which is divided into 8 small cubes by bisecting each edge, I am trying to find out the surface area of each of the faces and the corresponding outward normals for them. This operation is done on a finite element mesh, so I have transformed the cube into the isoparametric form using shape(basis) functions... |
I'm trying to get the normal modes of a system of springs and dasphots using
the basic dynamic equations for a linear, damped elastic structure:
$ M \ddot{u}(t) + C \dot{u}(t) + K u(t) = f(t) $
to get the normal modes, the following QEP (quadratic eigenvalue problem) must be solved
$ (\lambda^2M+\lambda C+K)\bar{\psi... |
I have just started with PETSc hence it might seem like a very stupid question but I couldn't find any answer in manual.
After Calling KSPSolve, where can I access the soluition for my linear system?
Example for a matrix:
$$
\left(\begin{array}{ccc}
2 &-1 & 0\\
-1 &2&-1\\
0&-1&2
\end{array}\right)
\left(\begin{array}... |
If $u_1$ and $u_2$ are solutions of (weak-form) Laplace equation on a connected domain $\Omega$, with Dirichlet boundary values $u_{\partial\Omega, 1}$ and $u_{\partial\Omega, 2}$, respectively. If $$u_{\partial\Omega,1} \neq u_{\partial\Omega, 2},$$ we know $$\|u_1-u_2\|_{L^2(\Omega)} \neq 0.$$
My question is, for any... |
What is the difference between the Dishonest Newton method and the Very Dishonest Newton method? Is there a difference or do they mean the same thing?
I have tried searching for this on the internet but I can't find anything. I understand that in the ordinary ("honest") Newton method, the Jacobian is computed in each i... |
Suppose I know the expected sparsity of a matrix (i.e. the number of non-zeros / total possible number of non-zeros). Is there a rule of thumb (perhaps approximate) for deciding whether to use sparse matrix storage (specifically, compressed row storage) vs. storing it as a dense matrix?
Speed is more important in my a... |
The goal is to display the relation between K and E in the following equation:
$$\cos(K) = 5 \text{sinc}( 5.12\sqrt{E} ) - \cos(5.12\sqrt{E} )$$
The intended result is:
However, using the following code:
k = linspace(0, 3*pi, 99); % 0 < k < 3pi , crystal momentum.
E = linspace(0.1, 3.5, 99);% Energy.
[X, Y] = meshgr... |
As a simple exercise for a class in computational methods for physics, we've learned how to implement the RK4 (Runge-Kutta 4th-order) algorithm for a very simple exponential decay. E.g. the function y(t) is governed by
Based on the RK4 definition from most sources, and specifically in this case Wikipedia,
determinin... |
If I just need a chain of cartesian coordinates (as parameters/dimensions) that photon travels one after another until it reaches to a stop (hitting a wall or something), can GA minimize its path to get true ray tracing, if objective function returns total time of travel and whole 3D space is uniformly divided into nod... |
I am trying to solve the viscous Burger equation
$$
\frac{\partial u}{\partial t} + u\frac{\partial u}{\partial x} = \mu \frac{\partial^2 u}{\partial x^2}
$$
with Neumann boundary conditions. I am
using the Maccormack predictor-corrector scheme:
$$
u_j^\overline{{n+1}} = u_j^n - \frac{\Delta t}{\Delta x}(F_{j+1} - F_j^... |
I have asked this question already on maths and mathoverflow.
Just a question about a literature reference. I am writing a paper for engineers.
Usually for the Lagrange multiplier problem
$$
\nabla f(x)+\lambda \nabla g(x)=0
$$
the sensitivity result that the multiplier $\lambda$ gives the sensitivity for changes in t... |
In a traditional PDE solver on unstructured meshes, we know exactly the sparse pattern of the Jacobian matrix, and we know that the amount of data to communicate is far smaller than the amount of local data.
Then is it more efficient to use ghosted PETSC Vec (created with VecCreateGhost or VecCreateGhostWithArray) tha... |
I am applying optim() function in R to obtain maximum likelihood estimates of the fixed effects and random effects in a model with bivariate random effects. The code works well but it is very slow in executing the line of code involving the optim() function. I would like to know if there is/ are any specialized optimiz... |
Problem
In the case of a finite element code, I have many small (order of 30x30) matrix inverses (or LU factorizations), one per finite element. These matrix inverses never change and must be applied to vectors repeatedly in the context of a matrix-free solver.
Storing all these inverses is the memory bottleneck of the... |
I'm thinking to couple my fluid flow solver based on lattice Boltzmann method with a mechanical deformation solver based on finite element method to take account for solid deformation in my models. In fact, I'm looking for a fluid-structure interaction framework, which its fluid solver was written based on lattice Bolt... |
I am switching from OSX to Linux, which I am familiar with but have no greater experience. There are several different alternatives: archlinux, gnome, ubuntu etc. Which would you recommend for a PhD student in numerical analysis? I mainly use Julia, Fortran, C++, Python and occasionally Matlab. Thus it should be easy t... |
I'm new to numerical analysis, and have been learning root finding algorithms. I am a bit confused about the difference between Muller's method, and Newton's method using an n-degree interpolating polynomial.
How is the Muller's method, which approximates f(x) using a quadratic polynomial, different from the Newton's m... |
I've been trying to learn about root finding using Newton's method, which uses a quadratic interpolating polynomial. I found this text, Numerical methods for roots of polynomials, PART 2: McNamee & Pan, which has relevant theory, but there seems to be some error in the text.
While calculating $x_{i+1}$, shouldn't th... |
I was doing error analysis of numerical scheme and I get $L_1$ error for each grid size with $N$ element. I was searching reference to compute accuracy order/rate from that error data but doesn't find any good reference. Anyone know?
Error:
$e=|u-u_{exact}|$
$L_1$ error:
$L_1=1/N \sum_{i=1}^{N} e_i$
|
The Langevin function $\mathcal{L}(x) = \mathrm{coth}(x) - \frac{1}{x}$ occurs in computations related to elastomers and paramagnetic materials. It is easily computed accurately and with high performance as long as the issue of subtractive cancellation near the origin is addressed, e.g. by using a minimax polynomial ap... |
I struggle with this problem:
I understand how to apply Newton's method to a already given function but I can't seem to find that function in this case from the given input n, t, d and s. I'm completely new to numerical method's so sorry if I don't see the obvious. It would be nice if someone could lead me in the righ... |
I am trying to compute the following integration
$$
\int_0^\infty e^{-y}y^{a/2}L_c^b(y)L_e^d(y)dy
$$
using the generalized Gauss-Laguerre quadrature routine in the GNU Scientific Library. Here the $L$'s are the generalized Laguerre functions, and $a>-1, b>0, d>0$.
I am not sure how to choose the number of quadrature p... |
I am currently enjoying writing computational codes as a hobby. Right now I've worked out an Euler method and results are pretty good with up to $x=1$. Over $x=1$, instability starts to kick in. May I know why is this so? The equations are as below:
$$
df=-\frac{x^2}{y},\quad y(0)=1
$$
#Euler Method
import numpy as np
... |
I am trying to solve a non-linear time-dependent heat equation
$$\partial_tT=\nabla \left(k_T(T)\nabla T\right) + f$$ (similar to question Solving a non-linear heat equation with the galerkin method gives negative values) with a FEM-approach, using the continuous Galerkin method for the FEM part, the Newton method for ... |
I need to solve the following equation:
$$
\begin{pmatrix}
\frac{\omega^2}{c^2}\varepsilon_x-\mu_z^{-1}k_y^2-\mu_y^{-1}k_z^2 & \mu_z^{-1}k_xk_y & \mu_y^{-1}k_xk_z\\
\mu_z^{-1}k_xk_y &\frac{\omega^2}{c^2}\varepsilon_y-\mu_z^{-1}k_x^2-\mu_x^{-1}k_z^2 &\mu_x^{-1}k_yk_z\\
\mu_y^{-1}k_xk_z & \mu_x^{-1}k_yk_z&\frac{\omega^2... |
How well do explicit Runge-Kutta "tableau" methods compare to the state of the art ODE solvers and when do they fail? I've been reading Butcher's ODE book and he does a good job at introducing tableaus to represent different Runge-Kutta methods. This includes methods with built-in error estimates for adaptive steps siz... |
Writing this comment reminded me of something I noticed years ago about evaluating Bessel functions of the first kind $J_n(x)$ in Excel. (BESSELJ)
I don't use Excel now but at the time I'd checked MacOS and Windows computers with several different released versions of Excel and they all had the same problem.
This was c... |
I am developing a FEM fluid solver using the Taylor-Hood algorithm, i.e. quadratic interpolation for velocity, and linear for pressure.
I have developed the code for 2-D quadrilaterals and triangles, and everything worked fine.
I am trying to do it in 3D, using a combination of 20-noded and 8-noded hexahedrals, and I h... |
I have the following problem:
$$\begin{bmatrix}A &B \\C& D\end{bmatrix}\begin{bmatrix}x\\y\end{bmatrix} = \begin{bmatrix}\lambda I_m & 0 \\ 0& \mu I_n\end{bmatrix}\begin{bmatrix}x \\y\end{bmatrix}
$$
where $A$, $B$, $C$, $D$ are matrices, $I_m,I_n$ are identity matrices of sizes $m,n$, $x,y$ are vectors and $\lambda$ a... |
Many dense linear algebra decompositions (QR, SVD...) on an $m\times n$ matrix have cost
$$
O(\max(m,n)\min(m,n)^2)
$$
when implemented in practice on a computer. Is there a colloquial name or a more compact notation for this complexity? For instance, something like "linearithmic"? Or, how would you write it in the mos... |
I have a vague understanding of the compatibility equations for linear elasticity. They appear to be necessary in obtaining a unique displacement field. However, why is it that, in my papers I've come across, the compatibility equations aren't solved for in the linear elastic numerical formulation? Are they not a gover... |
I have found that in unstructured mesh, discretizing the laplacian operator with finite volumes requires special care, as given in An Introduction to Computational Fluid Dynamics: The Finite Volume Method, (section 11.8) but this is limited to constant normals along the element faces. What happens when these faces are ... |
I am using a second-order finite difference in space and time approximation for the 1D wave equation.
No source but initial data: $I(x)=\mathrm{e}^{-400 (x-0.5)^2}$.
Velocity $c=1$, $nx=501$, $nt=1001$, $x \in[0,1]$ , $t \in[0,1]$, $dt=0.001$.
After 0.2 seconds I get
However, if I change the initial condition to a sp... |
I am working on a multi-commodity flow problem where for a graph $G=(V, E)$, some flows are permitted to be split and some flows should strictly follow one path. I have formulated this problem as follows.
Problem Formulation
$$ \min \sum_{(i,j) \in E} \sum_{f \in F} c_{ij}^fx^f_{ij}$$
$$ \sum_{j \in V}x^f_{ij} - \sum_{... |
What are common methods to choose pivot blocks in Block LU (for non-SPD/non-Diagonally Dominant Matrices)?
|
The partial differential equation,
\begin{align}
\dfrac{\partial f}{\partial x} + a(x)\dfrac{\partial f}{\partial y} = 0
\qquad & f(0,y) = f(L_1,y) = c_0e^{-y} \\
& f(x,0) = c_0 \;,\; f(x,L_2) = c_0e^{-L_2}
\end{align}
for $f=f(x,y)$ has the nontrivial solution,
\begin{equation}
f(x,y) = Ae^{(-y-h(x))} \;,\quad a(x)=-\... |
I need to optimize affine transformations for of a set of triangles using energy function based on the connectivity.
The energy of an edge $e_j$ between triangles $T_a, T_b$ is given by
$$
E_j = \left[(A_a v_{a,1} + t_a) - (A_b v_{1,b} + t_b) \right]+
\left[(A_a v_{a,2} + t_a) - (A_b v_{2,b} + t_b) \right]
$$
where $(A... |
I have a TTree in ROOT with 1000 events and 15 variables associated to each of them. I would like to convert this in its entirety to an hdf5 dataset. How do I organise my data in HDF5 Groups such that I can access data both by event number and by variable (if I wanted all the data from the 'kinetic energy' variable, fo... |
Problem
Solving a non-linear system of equations.
The number of variables is the same as the number of equations.
When I fix a set of variables (say $\vec{y}$) and keep another set free (say $\vec{x}$), the system becomes an under-determined, dense, and linear system of the subset of variables
$$A(\vec{y})\vec{x} = \v... |
I adapted this FEniCS code for my problem and I'm wondering if there is any good resource about how to choose the penalty parameter $\alpha$? Best case would be, if I can define it through some relation of the diffusion coefficient $D$ and element height $h$.
|
I set up two one-way wave equations for constant velocity $c$ in one-dimension. When I implement them I get a highly unstable (divergent) solution. I wonder if someone could give me a suggestion about what could be wrong with my reasoning. Thanks.
The idea behind the PML method
Perfectly Matched Layer
is to attenuate t... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.