instruction stringlengths 43 28.1k |
|---|
Following the documentation of Julia's Arpack package (Cf. https://julialinearalgebra.github.io/Arpack.jl/stable/eigs/) I have computed some largest and smallest magnitude eigenvalues of sparse matrices encoded in the required CSC format and noticed major discrepancies concerning the smallest magnitude eigenvalues $\th... |
I have been using python to do algebraic calculations, but at many times when writing 1/2 Python writes 0.5, but I wanted you to write 1/2 and only when needed, convert it to a float.
I'm having a hard time imposing a simplification because Python doesn't recognize 32.0 as being 32, in short example situation where I h... |
In the Wikipedia article on magnetic moments, subsection "Effects on environment" defines the magnetic field H of a magnetic dipole moment. Additionally the magnetic field lines of this field are drawn:
I want to reproduce this picture using Python - Matplotlib. I believe that my result is correct but it is visually p... |
I am developing an Abaqus UEL with 3D 8 nodes brick elements and I need second order derivatives of the shape functions, I have already mapped the first order derivatives from the element coordinates to the physical coordinates through: $\frac{\partial N}{\partial \textbf{X} } = J^{-1} \frac{\partial N}{\partial \textb... |
I have a 2D SDF describing my shape, but it's fine to think of it as a black/white image (black="inside" white="outside").
I want to generate a small set of rectangles (say, 8 of them) covering the image, which are allowed to overlap, and which minimize the amount of error. Error would be any leftover "black" areas of ... |
I want to find the trajectory $x(t)$ which minimizes the action $S = \int_{t_i}^{t_f} L(x(t), \dot{x}(t)) \mathrm{d}t$ numerically.
I am trying to do it by discretizing the action so it is more of a function which takes in a vector rather than being a functional. More precisely, given an initial guess for the trajector... |
I need to find a relation between the tangent stiffness $L_1$ of the first Piola-Kirchhoff stress tensor with the tangents stiffness $L_2$ of the second Piola-kirchoff stress tensor. They are defined as
\begin{align}
&L_1 = \frac{dP}{dF}\, ,\\
&L_2 = 2\frac{dP}{dC}\, ,
\end{align}
with $F$ being the deformation gradien... |
For animation purposes (see below) I need to use a parametrization which 'slows down' near a specific value;
More precisely, I am looking for a 'nice' monotonically increasing function $r:[0,1] \to [0,1]$ satisfying $
r(0)=0, r(1)=1, $ whose derivative is relatively small around the point
$r^{-1}(\frac{1}{2})$.
Afte... |
I am toying with the idea of using current libraries available with SCF (Self-Consistent Field) subspace iteration codes to train an ANN (Artificial Neural Network) to solve for SCF eigenvalue problems. Are there any obvious deficiencies with this idea?
Firstly, I would like to make sure that it is possible to train an... |
I've generated a solution for a planet motion around the Sun (placed at the reference frame center). I wanted to test what would I get for the error of the method I'm using (Runge Kutta with 4 stages, with semimajor axis and Sun mass as distance and mass units, and time units evaluated in order to have $G=1$) by evalua... |
Let $X = [0,1]$, $h$ the Gaussian function (i.e. $\forall x \in X, h(x) = e^{-\frac{x}{2}}$) and $p \in L^2(X^2)$
I would like to compute numerically the following function :
$$
\forall x \in X, \quad f(x) = \int_{X^2} p(s_1,s_2) h(s_1 - x) h(s_2 - x) \,\mathrm{d}(s_1,s_2)
$$
meaning that i have, a discretized grid fo... |
I have recently started to delve into someone else's code, and there is a part in there I don't quite understand. The authors of the code use some form of pre-conditioning to speed up the optimization. I wanted to inquire if you are familiar with this pre-conditioning, and could recommend some literature to read up on ... |
Goal:
I want to use Python to illustrate how a magnetic dipole with magnetic moment m2 moves in a non-homogeneous magnetic field in a 2D-Plane. This field is generated by another magnetic dipole with moment m1. However, I get results that are not plausible.
For the calculation of the trajectory of m2 I use the equation... |
Based on my basic understanding of the BFGS method, the algorithm will iterate until the gradient norm is less than or equal to a set value called "gtol" in the case of Python.
However, when using this method, and checking the output the following is showing:
Iterations: 2
Function evaluations: 76
Gradient evaluations:... |
In some problems we are currently working on, we are working with discontinuous functions that are defined on a finite element mesh and are established using Lagrangian particles. To obtain them on a finite element basis, we calculate the L2 projection. This works quite well and gives us a piecewise continuous represen... |
I am implementing a logarithmic quantizer which is defined as follows:
$$ q(u) = \begin{cases} u_i , \frac{u_i}{1+\delta} < u < \frac{u_i}{1-\delta} \\
0 , 0 \leq u \leq \frac{u_o}{1+\delta} \\
-q(-u), \ u < 0 \end{cases} $$
where the different parameters are computed based upon these expressions:
$$ u_i = p^{1-i}u_o, ... |
I have discretized a PDE with continuous finite element method in spatial variable and with implicit Euler or Crank-Nicolson in temporal variable. In both cases, I have error estimates in $L_2$ norm in form $\mathcal{O}(\Delta\,t^j + h^2),$ where $j=1$ for backward Euler and $j=2$ for Crank-Nicolson. In both cases I ha... |
Can someone explain me at a high level the difference between an SCP and an SQP to solve a nonlinear (nonconvex) program?
Assume my problem is something like
$$\min\limits_x. \quad f(x)$$
$$s.t. \quad g(x) \leq 0 $$
where both $f$ and $g$ are (in general) nonconvex.
My understanding is that (regardless or trust-region... |
In SU2 documentation about the numerical schemes (https://su2code.github.io/docs_v7/Convective-Schemes/) FDS is mentioned as a "standalone" method.
Yet, when looking online for more information about FDS scheme, it seems it is just a preconditioning for the ROE scheme. And this seems coherent with the fact that has rep... |
I need some (direct) sparse linear solver for fortran, which works with REAL16 data type. Any suggestions? Both Pardiso and MUMPS support only REAL8. (identical question: https://math.stackexchange.com/questions/4016856/sparse-linear-solver-in-fortran-working-with-real16?noredirect=1#comment8293130_4016856)
|
In the center of a 2D-Plane a positive static charge Q is placed with position r_prime. This charge creates a static electrical Field E.
Now i want to place a test particle with charge Q and position vector r in this static E-Field and compute its trajectory using the 4th order Runge-Kutta method.
For the initial condi... |
I need to plot the following functional with accuracy:
$$
I(x,s) =\int_0^\infty\mathrm dy \frac{F(x + \mathrm iy,s) − F(x −\mathrm iy,s)}{\mathrm e^{2πy}-1},
$$
Where $ F(z,s) = \dfrac{1}{z^s\Gamma(\sin^2[π\Gamma(z)/(2z)])} $.
And let us restrict $s\in[0,1]$
What is the most efficient way of computing this integral?
... |
The goal
Implement some Python code to find the extrema points of a function that is strongly oscillating.
The background
Let $G$ be a connected graph with $n$ points with Laplacian matrix $L(G)$. We may represent each vertex of $G$ as a canonical basis vector $|k\rangle$ for $k\in \{1, ..., n\}$, spanning a position H... |
I intend to check the diagonal of L, where A = L'L, for negative elements. However, I don't know if Cholesky is meaningful in theoretical / computational sense if there are some negative eigenvalues.
|
I want to solve a nonlinear ODE of matrix $A(t)$
$$\mathrm{i}\dot A = A(t)M(t),\:\mathrm{with}\: M(t)=A^\dagger(t)H(t)A(t)$$ where $H(t)$ and hence $M(t)$ are Hermitian. Therefore, I presume the time evolution of $A(t)$ is unitary. Is there any algorithm that can maintain this unitarity? I've heard of Crank-Nicolson, b... |
I am learning about simulated annealing algorithm and want to create a general purpose one for optimizing continuous functions.
The problem I have is how to generate the neighbor points as candidates. Random shift of steps is one strategy available in literature, but it seems more applicable for discrete problems.
What... |
Find the solution to the Cauchy problem consisting of the wave equation :
$$u_{xx}-u_{yy}=0$$ together with initial conditions: $$ u(x,0)=0,$$ $$u_{y}(x,0)=g(x)$$ for some known initial datum $g$.
Is the problem well-posed or ill-posed?
Why?
My thoughts:
By changing variables we have :
$$ u(x,y) = \xi(x-y)+\eta(x+y) $$... |
I would like to create an optimization solution for black-box software calculations. Currently, I am using the Levenberg-Marquardt algorithm to update a vector of parameters, $\beta$, with residuals, $r$, determined by outputting the black-box calculation and model parameters to a readable table.
$(J^TJ+\lambda diag(J^... |
Say, we have a Hamiltonian which for simplicity does not mix particle hole sectors. It is just a simple Hamiltonian in real space as shown,
$H=\sum_{ij,\sigma} A(i,j)(c_{i\sigma}^{\dagger}c_{j\sigma} +h.c.) $
In a specific spin sector (as spin sectors are decoupled) , we use the transformation $c_{i\sigma}=\sum_{n} \al... |
I am running a CFD simulation with a 200,000-vertex mesh. I've decomposed the mesh into 2 load-balanced sub-domains to test my parallel implementation. In the specific function that I am time-profiling, each sub-domain has to send a 3D gradient vector of MPI_DOUBLEs for each of the ~2000 vertices that lie on the parall... |
I have a finite element solver where I am using tetrahedral elements. I am solving for electric potentials and then calculate the current densities in each element, which are constant in each element. Now, assume that I want to calculate Fourier transforms for current density in the $x$ direction ($J_x$).
$$F(J_x(x,y,z... |
I need your helps about solving the problem below with MATLAB. I am trying to solve 2D Stress Wave Propagation problem by using FDTD(Finite difference time domain) method on the cylindrical coord. I have discretize the domain and now ı am trying to apply boundary conditions. I have the boundary condition equation below... |
Given $\mathbf V_t=\mathbf v_t\mathbf v_t^H$ where $\mathbf v_t=\left(e^{j\theta_{1}},e^{j\theta_{2}}\right)^H$:
\begin{equation*}
\begin{array}{ll}
\underset{\mathbf V}{\operatorname{minimize}} & 1 \\
\text { subject to } & \operatorname{diag}(\mathbf V)=1\\
&\|\mathbf V\|_*-\operatorname{trace}\left[\boldsymbol\lambd... |
There are 3 sensors (A, B, C) on a plane, located in the corners of a (known) equilateral triangle.
I want to calculate the (2D) location of an object (X) inside that triangle.
One sensor returns one scalar value per reading, but in order to compensate for environmental effects, I always use the values relative to each... |
Let $A$ be a symmetric matrix. It is then well known that computing the LU factorisation of $PAP^T$ instead of $A$ for a suitably chosen permutation matrix $P$ can greatly reduce fill-in. My question is: Can we show that considering nonsymmetric permutations, i.e. $PAQ^T$, cannot reduce fill-in even further?
|
I have a finite element solver that I implemented in MATLAB. I am calculating a specific potential function that is constant in each tetrahedral element. The question is, I want to be able to interpolate this potential on a rectangular grid on a slice. How can I achieve this? I can take the middle points of each elemen... |
I'm trying to bin a 2d array of points such that each bin has an equal number of samples contained in it. This would mean having bins of differing ranges and possibly shapes.
I have seen this stackexechange thread asking about the same thing. The answer there points to using a kdtree.
My question is: can scipy.spatial.... |
I'm working on a Monte Carlo project similar to the Ising model. I've found many examples on which I've based my code.
From some papers I read on binning analysis, the errors after each binning step are supposed to converge. Mine ended up oscillating after some binning step. And so I'm getting negative auto correlation... |
I want to solve the equation of inflation involving a scalar field numerically using Python libraries such as odeint or scipy. The equation is:
$$φ''(t) + 3Hφ′(t) + V′(φ(t))=0\, ,$$
with given condition: $3Mp2H2 = V(φ)$.
Can anyone help me with the code and advice on how to progress on this?
|
I have a question regarding the positive definiteness of the stiffness matrix. Specifically, I believe that it should be positive definite only when at least one Dirichlet point is given, so I would like a clarification on which is the precise moment that the stiffness matrix becomes positive definite. Let us consider ... |
I've implemented the Hodgkin Huxley model, which worked fine in my visualization, I got the spiking etc.
Then I've build a network with a few thousand neurons and experienced random NAN (not a number) flooding the network; I could track it down to how sodium and potassium are updated. e.g.
VoltageDelta = MembranVoltage... |
Does there exists a data structure with these properties
Stores vectors in a dictionary
When given a key that is also a vector, returns the k nearest vectors using a similarity metric (e.g. Euclidean, Cosine)?
Something computationally efficient would be ideal.
|
I have an optimization problem where i need to find an image x, that is very close to x' such that:
monitor(x') is valid but monitor(x) is invalid. (output is valid
when the neural network output is inside bounds of specific box).
x is same classified as x' by a neural network(their prediction class is the same).
N... |
I have managed to write the following code for the following problem:
Projectile's horizontal and vertical displacement are given by:
$$ x = v_0 \, t \cos(\theta) $$
$$ y = v_0 \, t \sin(\theta) - \frac{1}{2}gt^2$$
Consider the time interval to be $t \in [0, 60] seconds$.
Write a Python code to plot horizontal and max... |
I am trying to solve the following coupled partial differential equations with a finite difference scheme:
$$\partial_tf+v\partial_zf+\partial_z\frac{1}{W}\partial_zf=0$$
$$\partial_tW+v\partial_zW-\partial_zf=0,$$
where both f and W depend on t and z.
In order to solve both equations simultaneously I am trying to use ... |
I'm trying to compare the simulation time for solving a system of differential equations with and without jacobian pattern for a toy model using ode15s in MATLAB.
global mat1 mat2
mat1=[
1 -2 1 0 0 0 0 0 0 0;
0 1 -2 1 0 0 0 0 0 0;
... |
This is a follow up to my previous question posted here
I'm trying to construct the sparsity pattern of the jacobian matrix to speed up the computation of a large system of odes. The following is the code in which I am trying to set up the jpattern in
odeset for a toy model in MATLAB.
global mat1 mat2
mat1=[
1 ... |
I'm currently trying to implement my own FVM code in cpp, but when I try to calculate the laplacian of a test function, given by
\begin{align}\phi_0=\sin(2\pi x)\sin(2\pi y),\end{align}
I get unphysical boundary values as seen in the figure. I used a Dirichlet boundary condition with 0 value on every boundary.
My code ... |
When modeling boundary layers, it is typically required to have a highly refined mesh along the boundary. My question is if there has been success with high order finite element methods to overcome the need for highly refined meshes. Can a high order basis function of a finite element successfully capture the steep gra... |
Assume I have a multidimensional grid $G$. I consider two functions $f(x)$ and $g(x)$. I have solved the values for the functions over all grid points $x \in G$. Let me now be interested in some third function $F(f(x),g(x))$. I am looking to evaluate $F$ at a point $y$ that is not a grid point using interpolation.
Ther... |
I've read an article (Long-term integrations and stability of planetary orbits in our Solar system) in which the authors solved the problem of the absence of an analytical solution for the solar system planetary dinamics by making a very accurate solution. They called it a "pseudo-exact solution". They then used this s... |
In this document they describe their code as an integrated modelling tool. I am trying to understand how this is different from a regular modelling tool? Most codes include different modules that do different tasks, but I have never heard anyone refer to this as an integrated code. What does a code have to do to become... |
This is a follow up to my previous question posted here.
I've set up an ode system in MATLAB and I'm trying to vectorize the code to increase the speed of computation.
The follow is the code for my toy model.
global mat1 mat2 k
k = 2;
mat1=[
1 -2 1 0 0 0 0 0 0 0;
0 ... |
I have a geometry where current density distribution is constant. I can calculate the $z$ component of magnetic flux density according to Biot-Savart law as following:
$$B_z(x,y,z) = \int\limits_x\int\limits_y\int\limits_z
\frac{(y-y')J_x(x',y',z')-(x-x')J_y(x',y',z')}{((x-x')^2+(y-y')^2+(z-z')^2)^{\frac{3}{2}}}dx'dy'd... |
I am looking for FOSS code that can generate self-avoiding random walk trajectories on a tetrahedral lattice. The purpose of the exercise is to create random conformations of model polymer chains that serve as input to a simulation protocol. It would be nice if the code satisfied the following criteria:
Implemented in... |
I want to solve a diffusion analysis using finite elements. According to fick's law, governing equation is
$$\frac{\partial h}{\partial t} = D \frac{\partial^{2} h}{\partial x^{2}}$$
. h is relative humidity and D is moisture diffusion coefficient and it is relative humidity dependence.
$$D = 2.26 \times 10^{-6} \Bigg ... |
Does non-dimensionalizing ODEs affect the stiffness of the equations? Can it improve the stability of numerical methods like ode45,ode113 in MATLAB?
I am trying to solve 2 eqns. which might involve very tiny step size to get stability like 1e-11. I want to improve the speed of the numerical method. Can non dimensionali... |
I'd like to know the length made by the intersection curve of two orthogonal cylinders of different radii a and b where a > b >0.
I came across this post that provides a solution with an elliptical integral:
https://math.stackexchange.com/questions/1340318/arclength-of-intersection-between-2-perpendicular-cylinders
My ... |
I am using CVXOPT, particularly to solve a nonlinear convex optimization problem. Either the objective function or the constraints involve some functions that are only defined in a strict subset of $\mathbf R^n$. For example, the function is the logarithm $\ln$. It seems that the package may well use symmetric primal d... |
I'm looking for introductory resources--web pages, book chapters, articles--that introduce the C language with an immediate focus on bit-twiddling functions (e.g. bitwise XOR, AND, shifts), and of course branching and looping, but with very little discussion of large scale program structure (e.g. header files), pointer... |
I'm trying to do an experiment concerning various data-storage formats. I'd like to run an open-source compression benchmark that demonstrates storage format A allows for FASTER compression than format B. However all the open-source benchmarks I find only focus on compression ratio which I'm not interested. Does anyone... |
I do need to numerically calculate the following forms for any $x\in\mathbb{R}^n$, possibly in python:
$x^T M^k x$, where $M\in\mathbb{R^{n\times n}}$ is a PSD sparse matrix, $n$ can be quite large in the orders of $10^3$ or higher, and where $k$ can get large values $-$possibly up to order of hundreds. I prefer $k$ ... |
I have a blackbox function that (for the purposes of this question) looks like $3+\cos(x) + 0.005/(x-a)$. The location of this $a$ is unknown (but within $0\to2\pi$). (The $3+\cos(x)$ is just a (bad) approximation.) I need to find the roots of this function. Unfortunately the functional form is too complicated to be an... |
I have solved the 2D Poisson equation using finite element method with simplex triangular element in MATLAB.
First, I generated the triangular mesh using pdetool in Matlab and it gives me three matrices: p (position of each node), t (element with three vertices) and e. Then, I derived the local stiffness matrix like th... |
I'm a master student with a good Numerical analysis background. I'm going to do a master thesis in the same subject, but I need to use C++ since my advisor loves it, and I also believe it's the best programming language to have full control on what's going on in numerics.
I think I have a good background in C++, I impl... |
I'm trying to evaluate the perturbations magnitude between 2 body orbiting a central one in three dimensions. In order to do this I need to have an estimate of the error, which I did using Richardson extrapolation as described here. I'm using Runge-Kutta 4 and also velocity Verlet. Things seems good in the unperturbed ... |
I asked this question a few days ago on stackoverflow, but I figure scicomp.stackexchange is probably a better place. Sorry for the double post.
I want to solve a system of nonlinear equations using scipy.root. For performance reason, I want to provide the jacobian of the system using a LinearOperator. However, I canno... |
I need to solve many very large systems of first order ODEs, which describe some chemical reactions. The number of variables (in each system) is on the order of $n \sim 10^5$. I am using ALGLIB vector ODE solver, which under the hood implements Cash-Karp adaptive ODE solver.
Chemical equations are often considered as s... |
I have just begun learning computer science to apply it to Physics and I am trying to write a code for solving Schrödinger's equation of the harmonic oscillator (setting $V=\frac{x^2}{2}$) in one dimension.
I know the basics of how to do this, but I would like to know whether some resources are available, or if someone... |
I was asked this open ended question in an interview once:
How would you find a solution to the normal equations with limited memory?
Unlike Solving sparse least squares system with limited memory, the matrix $A$ is not necessarily sparse. It could be dense.
The question was asked in a machine learning / stats contex... |
I am an intermediate user of Matlab and Mathematica, but I would really love to start learning Python language for scientific purposes (I am interested in Maths and Physics).
Could please someone recommend me a book for learning scientific Python (the best would be a book inclusing also some codes to be able to put di... |
Let's consider the usual Poisson problem for FEM $$-u''(x)=1 \quad x \in [0,1]$$ with homogeneous Dirichlet boundary conditions. The solution is $u(x)=-\frac{1}{2}x(x-1)$
I know that the FEM solution (I'm assuming linear elements) is exact at nodes, as noted also here
I implemented my code with constant step size $h$. ... |
I'm trying to draw the bifurcation diagram of the following ODE,
This ODE leads to a saddle-node bifurcation (see wiki)
However what I get is not exactly right. There's a lot of "noise" as you can see on the figure below.
Normally there should be the blue line (stable line) that goes from bottow left unto intersectio... |
I have output from a 3D linear elasticity finite element simulation which uses linear tetrahedral elements, such that the displacement is continuous over the nodes but the gradient is not ($C_0$ continuous). I wish to "upgrade" the displacement data so that it can be reported as a $C_1$ continuous quantity which I can ... |
I saw many stopping criteria for Newton's method all around Web and books.
Some are defined from the residuals:
of either current iteration only:
$$
\|f(\mathbf{x}^{(k)})\| \leq \epsilon
$$
(https://fr.wikipedia.org/wiki/M%C3%A9thode_de_Newton#Crit%C3%A8re_d'arr%C3%AAt)
or of current and previous iterations, mixing ... |
Lagrange elements of any polynomial describe piecewise continuous functions. Typically, those functions are differentiable.
Mixed finite element methods use vector fields of even less continuity, such as normal continuity. With some great oversimplication, one might argue that discontinuous Galerkin methods, hybridized... |
I am a novice getting my toes wet in continuum mechanics and nonlinear elasticity. I have seen papers that use both approaches in developing constitutive connections to compliment balance equations of various sorts. My question is the energy inequality more general than the virtual work approach? I am tackling a visco-... |
I am learning Finite Volume method using the textbook "An Introduction to CFD: Finite Volume Method" by Veersteg and Malalasekera.
I would like to solve a heat conduction problem over a square grid $0.5m$ in length with all the boundaries maintained at $0°C$. For that, I need to discretize the Poisson equation:
$$ \fr... |
I solved Schrödinger equation for a following tow-level time-dependent Hamiltonian numerically in two ways:
import numpy as np
def H(t):
return np.array([[t,0.5],[0.5,-t]],dtype="complex64")
First, the state is treated as wave vector:
from scipy.integrate import solve_ivp
def schrodinger(t, X):
dXdt = -1j * H... |
I have a list of vertices and faces. Now, I want to create a mesh using the given points and faces list and visualize it. Also, I want to play with the mesh by adding an extra point on the faces. Can anybody guide me on how to do this using matlab? Any function name or guide would be helpful. I found a way to create a ... |
Here is the output of Numpy
np.fft.ifft([0, 4, 0, 0])
array([ 1.+0.j, 0.+1.j, -1.+0.j, 0.-1.j]) # may vary
Here is the output of Matlab
res = fft([0, 4, 0, 0])
res =
4.0000 + 0.0000i 0.0000 - 4.0000i -4.0000 + 0.0000i 0.0000 + 4.0000i
ifft(res)
ans =
0 4 0 0
What is the reason behind d... |
I have a simple triangulation for a 2D domain, described by the connectivity matrix $T$ and by the point matrix $P$.
For didactic purposes, I assembled the stiffness matrix for $-\Delta u = f$ by using the reference triangle. With $\mathbb{P}1$ basis functions everything is easy because all the gradients are constant t... |
I am trying to use finite element method to discretize the following problem
\begin{align}
\min_{u \in H^1_0(\Omega)} \int \| \Delta u(x) - 0.5*[u(x) + \langle e, x \rangle + 1]^3 \|^2_2 \ d\Omega,
\end{align}
where e is the vectors of ones.
The solution $u$ is scalar-valued.
It is not clear to me, how should one handl... |
I'm solving the simple Poisson problem $$-u''(x)=1$$ in the interval $[0,1]$ with $u(0)=u(1)=0$.
I discretised my domain as done here, i.e. with
nodes = [0, 0.125, 0.25, 0.375, 0.5, 0.625, 0.75, 0.875, 1.0]
and
elements = [[0, 1, 2], [2, 3, 4], [4, 5, 6], [6, 7, 8]]
I'm trying to assemble the matrix and the r.h.s by lo... |
For solving PDE with self written code it is needed to preprocess the data from mesh generators. I recently started shifting from cartesian grid to unstructured.
I finished reading up to FVM part of the book by the author - S.Mazumder, suggests extracting the following information:
Geometry-related information:
• Whe... |
The absolute error criterion of the pathwise approximation of an Ito process $X$ by an Euler approximation $Y$ is:
$$
\epsilon=E\left(\left|X_{T}-Y(T)\right|\right)
$$
We shall say that a time-discrete approximation $Y^{\delta}$ (with $\delta$ the step size) converges strongly with order $\gamma>0$ at time $T$ if there... |
I have been trying to write a program that analyses EM wave scattering by a dielectric sphere for a project.
The reference is Sadiku's book Numerical Methods in electromagnetics Edition 3.
Now the book has code in Matlab but I have to use Python.
I rewrote the code in Python and ran it, but the values Ey/Einc and Ez/Ei... |
I need to find the temperature distribution of a square plate using the Laplace equation by using FDM:
$$ \frac{d^2T}{dx^2} + \frac{d^2T}{dy^2} = 0$$
But there is a heat flux entering from the top boundary $q = 10^5 W/m^2$. How do I incorporate this heat flux into the problem? Should I:
Add it as a boundary condition ... |
Can anyone please suggest some libraries which allow use CUDA in Python for numerical integration and/or solving of differential equations?
My goal is to solve large (~1000 equations) of coupled non-linear ordinary differential equations and I would like to use CUDA for it.
|
I have a function $c ( I (\vec{r}) )$. Not a constant, $c$ doesn't denote a constant. So $c$ is a function of $I$ which is a function of $\vec{r}$. $I$ is an intensity (W/cm2).
This $c$ is hard to sample and I have sampled it for 10,000 values of $I$.
I need to integrate $c$ across all the space, i.e. a 3Dimensional in... |
I am currently trying to implement Source Panel method as described in Katz and Plotkin in Low Speed Aerodynamics. I have successfully implemented two previous methods. However, I am fully blocked on the source panel method in implementing the SOR2DC function as is called in the book in section 11.2.1.
Theta 1 and The... |
given the following system:
$$\frac{dP}{dt} = \alpha P(1-\frac{P}{K}) - \beta P I$$
$$\frac{dI}{dt} = \beta P I - \rho I$$
how do I solve the system numerically. as when I attempt to solve this is the error I get.
/home/gideon/anaconda3/lib/python3.7/site-packages/ipykernel_launcher.py:19: RuntimeWarning: >divide by z... |
I have found the following PDE problem in a paper:
Essentially, we have a rectangular domain where there is a unknown interface $z=\xi(x)$ (liquid-air interface) separating the domain into two medium (air on top for $i=a$ and liquid at the bottom for $i=b$). We need to solve Laplace equation (3) subject to Dirichlet B... |
I am solving the poisson equation and I constructed the global stiffness matrix in compressed row storage format. Then I wrote the preconditioned conjugate gradient solver for solving the system of equations. Now my problem is how I can apply the boundary condition when I have the global stiffness matrix in csr format.... |
I'm currenly working on my own PDE solver for non-linear simulations in python. I've done succesfully simulations for KdV and Fisher's equation, but now I'm playing with second order derivatives in time.
The equation I'm using is 1D wave equation, with $\Delta x = 0.5$ and $\Delta t = 0.01$. For simplicity I'm using $c... |
I have tried in different ways to see what happens to voltage V and gating conductances m, n and h when, at time step x, current I switched from 0 to 0.1, and then at time step x + n it gets back to 0.
This code that I'm posting works: I integrate in chunks, as many as I define at the beginning, and depending on the nu... |
A few Computational Fluid Dynamics (CFD) codes implement the so called PISO (Pressure-Implicit with Splitting of Operators) algorithm for pressure-velocity coupling.
My concern is what is actual temporal order of accuracy of the algorithm?
It probably isn't enough to discretize time-dependent term in transport equation... |
Assume we have an (at least) 2nd-order differentiable energy $f(x), x\in R^n.$ And $n$ is very big. Mathematically, I think it is impossible to find a point $\bar{x}$ where the energy cannot be decreased along its negative gradient when the gradient is not equal to zero. However, such kind of case can be occasionally f... |
I am trying to determine need for solving large scale nonsymmetric eigenvalue problems in both industry and academia.
I am interested in any kind of problem where we cannot assume that matrices are symmetric. This includes the standard eigenvalue problem, the generalized eigenvalue problem as well as the quadratic eige... |
I have been given a 4D ($x, y, v_x, v_y$) distribution function, $f(x,y,v_x, v_y)$, generated by an external code. I want to generate a set of particles from this distribution function, say 10k particles each with their own $x, y, v_x, v_y$. I want to launch these 10k particles in my own code and follow them for some t... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.