instruction stringlengths 43 28.1k |
|---|
I have used different variants of the Laplacian operator (div grad) using 4, 8, 12, 20 and 24 of the closest points. I get problems due to the chosen coordinate system and the discretization of the Laplacian operator. See images originating from circular symmetric seeds:
It is implemented as https://www.shadertoy.com/... |
Consider the following stochastic differential equation
\begin{equation}
dy=\left(A-\left(A+B\right)y\right)dt+C\sqrt{y\left(1-y\right)}dW\tag{1}
\end{equation}
where $A$, $B$ and $C$ are parameters and $dW$ is a Wiener increment.
Equation $(1)$ will be our point of reference in what follows.
Now, first let us cons... |
I am trying to model a linear elastic material in Abaqus using a UMAT. For my application, I need to rotate the 6x6 compliance matrix for a given set of eigenvectors (or a rotation matrix). I came across a thread titled "debugging a rotation matrix for elastic constants" where this theory was explained in very good det... |
I use python for my algorithm which uses only one core and I need more processing speed.
I have i7 6700K CPU with 8 cores. How to convert them to one core to have a total performance of 8 cores?
Multiprocessing and multithreading python modules don't fit in my case.
|
Background
In solid fem, we often solve $$\mathbf{Ku}=\mathbf{p}$$
where $\mathbf{K}$ is global stiffness matrix, $\mathbf{u}$ is displacement, $\mathbf{p}$ is global load vector.
If displacement not be constrained, equation above can not be solved, because the system can have rigid body motion.
In 2D case, the rigid b... |
I parallelized my code with openMP, and now have this bug in my code that's really odd. If it's the first time I run on a computer, it segfaults, but if I run the program again it runs fine. I've never seen anything like this and was curious if anyone has seen this before or has good resources or hints on how to fix th... |
Please excuse me if this question somehow looks trivial or not really interesting, but I recently have a hard time to convince someone else that my algorithm for constructing a self-similar binary structured-tree (read more here: https://doi.org/10.1002/cnm.3229) is correct. So, the algorithm is summarized in these 4 s... |
I have an objective function F: Nx1 -> Nx1, where N>30000. There are many sparse matrix/tensor multiplications in this function, so taking an analytic Jacobian by paper and pen is cumbersome.
Which (AD) tool should I use to compute a sparse Jacobian as fast as possible? If needed, I am ready to rewrite my code from Mat... |
Half the run time of my code right now is evaluating a big function over many, many points, it takes maybe about 20 seconds per evaluation
The function consists of a bunch of simple operations that look like
Ux = ((1./72).*(x.^2+y.^2+z.^2).^(-5./2).*((-5).*x.*(4.*x.^4+3.*y.^2.*( ...
y.^2+z.^2)+x.^2.*(7.*y.^2+z.^2)).*... |
I have a matrix $M$ with non-negative real entries, and I would like to minimize the objective function
$$\Phi(v) = \|Mv\|_\infty,$$
where $v$ is constrained to be a probability vector, i.e., $v_1+\dots+v_n=1$ and $v_i\ge 0$. Is there an efficient algorithm for this?
Motivation. This comes up in solving a two-player g... |
I am just learning (more) about automatic differentiation (AD) and at this stage it kind of seems like black magic to me. The second paragraph of its Wikipedia article makes it sound too good to be true: it is extremely fast and is exact (no round off, no discretisation). I am left wondering why finite difference (FD) ... |
Before jumping into my question, let me contextualize it.
I'm doing numerical simulations of a Helmholtz scattering problem
$$\Delta p + \kappa^2 p = 0\, .$$
The incident pressure wave $p^{inc}$ will be scattered by some obstacle on the boundary $\Gamma_{obstacle}$ such that $p = p^{inc} + p^{sc}$.
From the literature,... |
I have a sparse matrix $W$ which is almost-squared ($N+1 \times N$) and I would like to know the eigenvalues of $A = W^T W$. $A$ is Hermitian so the eigenvalues are real-positive valued.
The usual approach would be to do svd(W), but I found no GPU SVD sparse implementation. I'm working in python but I'm good with any l... |
I'm dealing with a problem as follows:
I have a finite set of money to spend over different raffles, and I need to spend approximately to my budget, with the goal of maximizing my probability of my total winnings across all raffles being a constant . Each raffle has a different prize amount , and there is a certain ... |
I wrote a 2D-FEM solver to solve some diffusion process and wanted to verify my code with a test problem.
The input was $f(x,y) = x^2+y^2$ and I applied the stiffness matrix on it to get $\Delta f = 4$.
The lumped mass matrix $M$ and stiffness matrix $D$ are assembled from an analytical solution of triangles.
Unfortuna... |
I have written a program to solve for Newton's 2nd Law of motion for a given force law, in 2D polar coordinates.
It is known that if the force law is of the form $k/r^2$,we get conic sections as solution(https://en.wikipedia.org/wiki/Kepler_problem).
But when I run the program, I get a spiral trajectory (which isn't on... |
I asked this question on the Computer Science stack exchange (https://cs.stackexchange.com/questions/128710/faster-computation-of-ke-x-h2), but it appears that it is more appropriate in Computational Science stack.
Essentially, I want to compute $$f(x) =\sum^n_{i = 0} k_ie^{-(x - h_i)^2},$$ where $n \geq 0$ and $k$ and... |
How would you approach a standard convex quadratic problem with convex constraints but one non-convex term ? Say $|x|^{0.4}$.
$$\min_x \frac{1}{2} x^{T}Qx + g^Tx + c^T \mathrm{sign}(x) |x|^{0.4} $$
subject to $$Ax\leq b$$
Where $|\cdot|, \mathrm{sign}()$ are element-wise.
Is there any other way to solve the problem w... |
I am working on developing a topology optimization solver based on the finite element method and I want to add a triangular shell element in it. I used the classic finite element method but I didn’t separate in-plane and off-plane strains. My strain-displacement matrix consists of the following:
$$
B_i=\left(
\begin{ar... |
Currently, I am solving a problem in the format:
$$\min_X X^TGX \\ s.t. \vec{1}X=M,x_i\in\{0,1\},\forall x_i\in X$$
$M$ is an integer as well. The problem that troubles me is that $X$ is a vector in $\{0,1\}$ with a size of $7000$. I use the solver in https://github.com/oxfordcontrol/miosqp. It seems they are using the... |
The main references of mesh generation methods in computer graphics (CG) I found are discrete Differential Geometry [1] and a famous book "Polygon Mesh Processing" [2], while the "Handbook of Grid Generation" [3] is the main reference book of scientific computation mesh generation. I found that few people who do mechan... |
I am used to running calculations on a server/cluster, and we have used both PBS and SLURM. However, I am looking to run some calculations on my local machine. I would like to be able to schedule my jobs so that they run more efficiently. Does such software exist for macOS? Ideally it would be free. Please let me know ... |
I am struggling to recombine the remaining triangular cells into unstructured quadrangular ones in this geometry using Gmsh. Do I need to add auxiliary lines somewhere or do some geometries just don't allow these type of cells?
The .geo script:
// Gmsh project created on Wed Jul 29 13:32:48 2020
SetFactory("OpenCASCAD... |
I'm a PhD student in genetics and molecular biology working on an algorithm to identify if a DNA sequence is either a transposable element (TE) or not a TE using convolutional neural networks, and it's already working kind of the way I'd like it to (of course I'm always trying to improve it).
The input is a FASTA file ... |
I want to interpolate a vector field inside convex polygons in a polygonal mesh.
For triangular meshes the scheme uses a piecewise constant interpolation in the triangle, discretized at the center of the triangle.
I am especially interested in interpolating the gradient of a scalar field on the vertices, so feel free t... |
I am sorry if this question seems like off topic or opinion based, but I was not sure how to go about it.
I am currently working on a 100k x 100k positive definite linear system and trying to solve it using Cholesky factorization from Scalapack 2.1.0 (pdpotrf). My problem is that when I run the same system for 50kx50k ... |
Suppose we want to solve an FEM problem in terms of HPC. What is the most usual way to do it:
Using an open-source software like mfem,deal.ii etc.. or,
Assembly the system by your own(read mesh file,create stiffness matrix etc..) and use a high performance software like hypre,PETSc to solve it.
|
I have a simple Matlab script which aims to compute $k$ singular values of a matrix $A$. $A$ is a random dense square matrix of size $5000\times5000$, with 100 of its singular values constrained to be 0 (though that last detail does not seem to matter for my question).
I'm doing this in Matlab via [Uk, Sk, Vk] = svds(... |
Isogeometric analysis [1] has the advantage of integrating geometric and mesh models using NURBS or Spline. At the same time, I would like to ask a question to my friends: for traditional FEM and FVM, why can't we use mesh to represent geometry and use the mesh which represents the geometry to do the computation direct... |
I'm trying to plot Lotka-Volterra Equations using Python. I am a real beginner when it comes to Python.
I have these two equations:
$$\frac{dR}{dt}=\alpha R-\gamma RF$$ and $$\frac{dF}{dt}=-\beta F+\delta RF$$
I have also rewritten these equations into an iterative formula:
$$R(t+\Delta t)=\alpha R(t)\Delta t - \gamma ... |
Is the Immersed Boundary (IB) method considered a Direct Numerical Simulation?
A DNS code is the most detailed type of simulation and the most accurate but computationally expensive, right?
What makes a simulation not a DNS?
|
I'm trying to implement Singular Value Decomposition (homework of sorts) via the Jacobi Rotation method (more info here, pages 11 and 12).
I am stuck at the bullet saying (sorry for the picture, but I'm not too familiar with writing formulas... yet):
I know how to find the sine and cosine which rotate a vector (say, a... |
Suppose that we don't know $n \times n$ matrix $A$ explicitly but we are only able to compute products $Ax$ where $x$ is a column vector with $n$ elements. Is there an algorithm to determine whether $A$ is singular?
|
I would like to solve the following equation
$$\frac{\partial^2 y}{\partial t^2} - c^2(x,t)\frac{\partial^2 y}{\partial x^2}=0,$$
for $y=y(x,t)$ numerically. The wave speed, $c(x,t)$, is of the form
$$c(x,t) = \begin{cases}
c_1(t), & x<0 \\
c_2(t), & x\ge 0.
\end{cases}$$
The initial conditions are
$$y(x,0)=f(x),$$
$$\... |
I am looking for a package which can solve (non-linear) least squares problems without the use of derivatives (because of an expensive model), but which also deals with ill-conditioning well (such as when the Jacobian is sparse).
For example, the DFO-LS (Derivative-Free Optimizer for Least-Squares) solver documentation... |
Question
When it is about solving a system of equations, is it possible to predict that whether high-frequency noise (e.g. checker-boarding) is likely to appear in the converged solution by looking at coefficient matrix attributes (e.g. definiteness, etc)? What solver types are less likely to result oscillations, direc... |
In the FEM, there are certain applications in which the condition number $(\kappa)$ of the overall global stiffness matrix $(A)$ is computed or reduced by some preconditioner $(P)$. Are there any applications where the condition number of the tangent stiffness matrix for a single finite element (or some subregion) in t... |
I have the following equation (the Kurz-Giovanola-Trivedi model [1])
$$
v^2 \frac{\pi^2 \Gamma}{P^2 D^2} + v \frac{mC_0(1-k)\xi}{D[1-(1-k)Iv(P)]} + G = 0,
$$
where $Iv(P)=P \cdot \exp(P) \cdot E(P)$, $P=\frac{Rv}{2D}$, $E(P)=\int_{P}^{\infty} \frac{\exp(-x)}{x} dx$ is the exponential integral function, $\xi=1-\frac{2k}... |
I am trying to solve a set of linear PDEs of the form
$$F\left(\vec{y},\frac{\partial \vec{y}}{\partial x},\frac{\partial^2 \vec{y}}{\partial x^2},\frac{\partial \vec{y}}{\partial t}\right)=0.$$
To solve it I am using the method of lines where I discretize in $x$ to get a set of differential-algebraic equations (DAEs) ... |
For finite dimensional symmetric positive semidefinite matrices $A$ and $B$, I would like to solve
\begin{align}&\min |X - A|_1 \\
&\text{subject to}\\
&X \preceq B \\
&0 \preceq X\end{align}
Here $|\cdot|_1$ is the nuclear norm/trace norm defined by $|X|_1 = \text{tr}(\sqrt{X^*X})$, where $X^*$ is the conjugate trans... |
I am trying to solve the Poisson equation for Heterostructures using SOR. The equation to solve looks lik
I have discretized the Poisson equation using finite difference and my code is written in FORTRAN 90. I have the following questions.
Is it correct to apply SOR to above equation (I have discretized the 2nd order... |
I have this idea in my mind that Direct Numerical Simulation (DNS) is only used in research since the Reynolds numbers of industrial applications are too high and require computer horsepower we don't have yet. Is that still true nowadays?
Any reference on the subject?
|
I am solving the Poisson equation for heterojunction using Fortran90. I use the SOR algorithm to arrive at the potential profile.
I see the weird behavior where the error (the difference between the $n$-th and $(n-1)$-th iteration of the solution) abruptly falls to zero when the error reaches 1e-7 range. Is this behav... |
What are some alternative algorithms to creating a bounding box for finding the max width of a concave, simple winding polygon, like the one in the below image? I prefer solutions that are more performant when implemented programmatically, even if they sacrifice some accuracy.
I am trying to calculate the max width of ... |
Although there are many algorithms to construct Voronoi diagram, some of them are faster than others. Based on my knowledge Fortune algorithm is fastest for construct Voronoi diagram either in two dimensional or three dimensional. I search many forums but can't find any Fortune algorithm(Fortune's algorithm) code or a ... |
I have been looking into simulations of phase separation in variants of the Cahn-Hilliard system and have been running into issues with implementing no flux boundary conditions on certain variants.
The Cahn-Hilliard (C-H) Equation here is:
$$\partial_t \phi = -\nabla\cdot\textbf{J}$$
$$\textbf{J} = -\nabla\mu$$
$$\mu =... |
I am trying to solve the 1-D heat equation numerically with a variable source term. The system is basically a tank containing styrene in which it polymerizes to liberate heat. I have assumed that the cross-section of the tank is much smaller compared to the length so any variations in the y and z directions can be negl... |
I have been given a few numerical simulations regarding fluid mixing and have been asked to extract a few parameters from them using C++. Altogether there are about 1000 VTK files per simulation, and there is one simulation per time step, each to be analyzed separately. Regarding the problem itself, as a result of flui... |
I have tried to solve 1-D Conduction Steady state heat transfer problems in Matlab (see below).
Here is the 1-D model:
T''[x] == 0, T[0] == 100, T'[100] == 0
Analytical Solution:
T[x] = 100 for x: [0, 100]
I am so suprised that so many iterations (2,500,000) are required for a correct solution (here:T=100 for every n... |
I must solve the following second order differential equation:
$\delta \phi^{''}_{\mathbf{k}}+(3-\epsilon)\delta \phi^{'}_{\mathbf{k}}+\left(\frac{k^2}{a^2 H^2}+\frac{V_{,\phi\phi}}{H^2}-6\epsilon +4\epsilon\eta -2\epsilon^2\right)\delta \phi_{\mathbf{k}}=0;$
which is that of scalar field perturbations at linear order ... |
A Voronoi diagram is a kind of tesselation that divided the medium into polygons in 2D and polyhedrons in 3D.
Although there are many algorithms to construct a Voronoi diagram, some of them are faster than others. Based on my knowledge, Fortune's algorithm is fastest to construct the Voronoi diagram either in two dimen... |
The well-known method for solving multi-physics time-evolution problems
called "the method of fractional steps" or "the method of splitting" usually applies to PDEs which have a sum of terms on the right-hand side, and basically it consists of using partial updates, one term at a time. So for a PDE
$
\partial_{t} f = ... |
I would like to know how can I generate a collection of random 2D closed smooth curves.
I thought about generating a random 3D surface with random peaks, and then intersecting the Z=0 plane with it, and extract the largest contour, for example. I just not sure how to do it practically... it is the correct way? I would ... |
Is the change in time step necessary for the grid independent study? As the CFL is based on the relation between dt and dx.
In mesh independent study, only change should be mesh i.e, dx isn't it so?
|
I want to evaluate the Birch-Murnaghan Equation of State (BM-EOS) for different volumes.
I tried declaring a 1D array A in which every element would be the answer of BM-EOS for different volumes.
B0P = 4; B0 = 30
V0 = 36; E0 = -535; R4 = -535
array A[400]
do for [i=1:400] {
A[i] = E0+(9/8*B0*V0)*((V0/((((i/100)**3)/10... |
Based on my readings this is what I have gathered:
Dimensions: Number of data points in the x, y, z directions
Spacing: Space between points in each dimension
Origin: Location of origin
Cell data: Number of total points
I must have a misunderstanding somewhere, as the file I am working with has dimensions 13 13 13, yet... |
I'm computing the Hartree potentials of atoms by solving the Poisson equation and I use hydrogen atom as a test case. The Poisson equation for hydrogen atom in atomic units is given by
$$\nabla^2 V_H = -4 \exp(-2 r)$$
where $r = \sqrt{x^2+y^2+z^2}$.
The numerical solution of $V_H(x,y,z)$ with $z=0$ is illustrated in th... |
Apologies if this isn't the appropriate forum for this question.
I have a set of elements that I need to iterate over as part of a modeling workflow. The elements exists over a set of dimensions (i, j, k, l). Due to model constraints, most of the elements within the set are not considered (value = 0). Therefore, loo... |
I am writing a code to calculate mesh quality stats such as: cell volume, face areas and non-orthogonality between faces (basically something like OpenFOAM's checkMesh).
As per F. Moukalled et al, a mesh is skewed when the line connecting adjacent cells centroids does not pass through the centroid of the straddling fac... |
I wish to minimize the quantity $$W=1/2x^TAx-x^Tg(y)$$ with respect to $x$ and $y$, which are vectors of unknowns. $A$ is a sparse square symmetric positive definite matrix and $g(y)$ is a vector with non-linear dependence on $y$. Everything is real-valued.
Finding $x$ given $y$ is straight forward:
$$Ax-g=0$$
$$x=A^{-... |
What are the practical differences between a Galerkin finite element method vs an orthogonal collocation method? The best reference I've found thus far as been a paper titled The Performance of the Collocation and Galerkin Methods with Hermite Bi-Cubics by Dyksen, Houstis, Lynch, and Rice. To me, it seems like:
When... |
I am trying to solve the set of equations posted here- Solving the heat diffusion equation with source term
One of the methods I have learnt to solve second order PDEs is the 'method of lines', where we discretize all independent variables except one. So for this example, I can discretize the spatial domain as follows-... |
Let's say I have a bag of marbles. Each marble has several attributes (color, diameter, surface roughness, weight).
I know that there is a statistical relationship between various marble attributes and weight. I am trying to optimize for the weight distribution (either maximize/minimize the mean or the variance) by onl... |
As a little summer project I have tried to make a ballistic calculator for when I play football, (following an example from a book),
just to learn some numerical methods while doing so.
My problem is that I cant seem to find much on the Runge-Kutta 5 method (method recommended) for systems of second order differential ... |
I have read an article talking about binary clustering using Matrix factorization(see attached), but i would like to understand some optimization concepts:
Is it reasonable to use a Frobenius norm in such optimization?
What does it mean the centroid constraint: C^T*1=0, and why it is equivalent to K-means especially i... |
I have a function like this
void foo(x, *y) {
some calculations
if (x > *y) {
*y = x/2;
}
more calculations
}
My parallel section is
int x[] = some array;
double y=0;
#pragma omp parallel for
for ( int i = 0; i<=n; i++) {
do something
for ( int j = 0; j<=n; j++) {
foo(x[i... |
I am trying to solve the coupled PDE system given here-Solve System of PDEs, using the method of lines and the ode15s command. Referring to variables $u1$ and $u2$ as $u$ and $v$ respectively, I have discretized the x domain as-
$$\frac{\partial^2 u}{\partial x^2} = \frac{u_{i+1}-2u_i+u_{i-1}}{(\Delta x)^2} \hspace{10p... |
I was checking some integration methods provided by SciPy, in which the DOP853 should be included according to the webpage (https://docs.scipy.org/doc/scipy/reference/generated/scipy.integrate.solve_ivp.html#scipy.integrate.solve_ivp).
However, unlike others, DOP853 does not work and the following message appears:
~/an... |
In several optimization problems, we found what we called the balanced constraint(c^T • x = z )
For exp: C^T • 1 = 0 (C is a binary Matrix)
Can I have an intuitive explanation about the concept and how it is balanced?
|
My post is structured in four parts:
I give you some information about the context my principal questions refer to.
I will tell you what I believe to know about the Thomas Algorithm. If I am wrong in any regards, correct me please.
I suggest two approaches on how to implement time stepping for the heating process.
... |
I am working in an application in which I need to calculate the surface area of a superellipsoid. I have read that there is no closed form solution (see here), so I am trying to compute it using numerical integration. The problem is that I am finding different results using different numerical integration methods, whic... |
I am trying to solve the non-linear parabolic PDE in $c(t,r)$
$$c_t=\frac{1}{r}(rDc_r-\alpha r^2 c)_r$$
with initial condition $c(0,r)=f(r)$
and boundary conditions $c_r(t,r_1)=\alpha r_1c_1/D$ and $c_r(t,r_n)=\alpha r_nc_n/D$; in other words, there is no flux across the boundaries.
This the Lamm equation, a 1-dimensi... |
Following this question, for the code below (from MS OpenMP docs example)
// omp_critical.cpp
// compile with: /openmp
#include <omp.h>
#include <stdio.h>
#include <stdlib.h>
#define SIZE 10
int main()
{
int i;
int max;
int a[SIZE];
for (i = 0; i < SIZE; i++)
{
a[i] = rand();
prin... |
Following the latest trends in linear algebra, power consumption is quickly becoming an important factor to consider when designing and using an algorithm.
I've even heard that over time, the electricity bill can exceed the initial purchasing cost of a supercomputer and people predict that in the future, HPC resources ... |
I'm having an issue with the easiest example of a nonlinear 1D PDE, the (inviscid) burgers' equation:
$u_t + uu_x = 0,~~(1)$
which can be rewritten as some convection equation
$u_t + f(u)_x = 0$
with flux $f(u) = (\frac{u}{2})^2$. I use a semidiscrete method to solve (1) with periodic boundary conditions: I use upwindi... |
There have been many papers quoting FLOP to quote the performance of a specific approach in machine learning. For example,
We trained two models with different capacities: BlazePose Full (6.9 MFlop, 3.5M Params) and BlazePose Lite (2.7 MFlop, 1.3M Params).
I assume they measured the number of Mega FLOP needed to run ... |
In term of the mathematical distance measurement,
What is the significance of a Frobenius norm for a binary matrix?
|
I currently have created a model airplane in Blender by drawing a closed volume with triangular planes. I want to do a FEM calculation on this object, meaning I need a fine 3D tetrahedral mesh of this structure. I have looked at threads like (Creating 3D Mesh from stl files with gmsh) which seems similar, but having en... |
I shall try to get to the point, so let me know if there is something left and you need more details.
I am solving a couple of equations that are not coupled explicitly, but their corresponding unknown variables, say $x$ and $y$ must satisfy a differential equation:
$\dot x = x + y,$
where dots denote derivative with r... |
I am trying to solve the Poisson equation in 2D for heterostructure devices. I have linearized the equation and discretized it using FDM. I am using BiCGStab to iteratively solve for the solution as follows:
Step 1: Solve $A^{(i-1)} x^{(i)} = b^{(i-1)}$ for $i = 1,\dots,N$ where convergence is reached
Step 2: Use $x^{i... |
I know sine is $2\pi$-periodic, but some people say the motion is "periodic in..."
Would it be periodic in $y$?
If we move along the $x$-axis, the function values $y = \sin(x)$ will repeat, so I think it's "periodic in $y$".
Is this correct?
|
Say a system of ODEs describing a dynamical system, with solutions/state-space vectors ($x$, $y$, $\theta$).
If values of $y$ and $\theta$ repeat but values of $x$ do not, would I say that the solutions are periodic in $y$ and theta but not in $x$?
I'm confusing this with a simple periodic sine function, I think.
|
Is there a simple algorithm to determine if a given polynomial (with all real coefficients) has all real roots? I do not need to know what the roots are; I just what to know if a given polynomial has any complex roots.
Background: I am aware that there are algorithms (for example see here) to compute all of the real ro... |
Mixed FE formulations with LBB-stable elements require two different meshes for the primary and the constraint variables, for example, displacement and pressure. With continuous approximation for the pressure field, I am finding it difficult to parallelise for distributed memory architectures.
I am interested in learni... |
I would like to store text data (matrix with numbers and letters) in a light way (light volume for easy exchange, and light to open it).
Question: are binary files lighter than txt? is it always true? And why?
|
If I make a quasi-steady assumption in a model such as keeping the fluid density constant and assuming the flow is incompressible, does modeling a flow with decreasing velocity / magnitude, say, as the flow moves from left to right, violate conservation of mass? If so, why?
|
The problem I have at hand is a regression problem where each of $p$ inputs, $x_1, x_2, x_3, \cdots, x_p$, needs to undergo a variable transformation using one of $q$ basis functions from a set of available functions $F = \{ f_1, f_2, f_3, \cdots, f_q \}$. The cost function is the Mean Square Error (MSE) defined as $MS... |
In many situations in unstructured mesh solvers, one needs to compute gradient of arbitrary variable $\phi$ such as temperature or velocity at face centers (one of such situations is correction for mesh non-orthogonality), which can be approximated as:
$$ \nabla \phi_f = (g_C \ \nabla \phi_C) + (g_F \ \nabla \phi_F)$$
... |
Using the Hamiltonian for a test particle in Kerr spacetime, we arrive at the following equations for generalized position and momenta (in natural units, $G = c = M = 1$):
\begin{align}
\dot{r} &= \frac{\Delta}{\Sigma}p_r\\
\dot{\theta} &= \frac{1}{\Sigma}p_\theta\\
\dot{\phi} &= \frac{1}{\Sigma\Delta}\left(2arE + (\Si... |
Are there any good, easy to use, software for simulating the evolution of systems of generic differential equations? I know there are custom programs for various specific circumstances (such as electrodynamics). But say I have some equations and I quickly want to simulate the evolution of some initial state; without re... |
I am writing a program in python that is supposed to calculate the magnetic field along a conducting coil that is made up of a bunch of points, and the magnetic field is generated by other conducting coils which were made by rotating the points that make up the original conducting coil. I have tried doing this using Bi... |
Suppose $n$ inputs ($x_1, x_2, x_3, \cdots, x_n$) can take on any of $m$ values, say $\{ k_1, k_2, k_3, \cdots, k_m \}$, and that there is a cost function $y = f(x_1, x_2, x_3, \cdots, x_n)$. For instance, for $n = 3$ ($x_1, x_2, x_3$) and $m = 2$ ($\{ k_1, k_2 \}$) we have a total of $8$ possible triplets $S = \{ (k_1... |
I have a question about my code which computes numerically the output field of a 4f setup with a pinhole in the middle which works as a spatial filter.
My setup consists of two lenses with 50mm focal length (distance 2f), and a pinhole between both lenses. The input field has a Gaussian field distribution, where the Ga... |
After using ode45 to solve a set of ODEs, I want to write a Matlab function to take the initial conditions x_0 as inputs and gives the final state x_1 at time T as the output, thus creating a discrete dynamical system f.
However, I'm having some trouble writing the function that would embed the initial conditions, the ... |
The runtime of Gaussian elimination on an $n \times n$ matrix is $O(n^3)$. What is the runtime on an $m \times n$ matrix?
I am taking Gaussian elimination to mean putting the matrix in reduced row echelon form. (Although I'm guessing there is no complexity difference between reduced row echelon form and just row echelo... |
In the standard formulation of Krylov subspace methods, you always have to divide by 0 somewhere in a solution, e.g., in CG,
$$
x_{k+1} = x_k + \frac{r_k^T r_k}{p_k^T A p_k} p_k\\
p_{k+1} = r_{k+1} + \frac{r^T_{k+1} r_{k+1}}{r^T_k r_k} p_k
$$
(Normally, of course, you never get there because the stopping criterion hits... |
Consider the advection equation
$$\frac{\partial u}{\partial t}+c(x)\frac{\partial u}{\partial x}=0.$$
With periodic boundary condtitions in $x$ with period $L$, i.e. $u(x,t)=u(x+L,t)$ and initial condition $u(x,0)=f(x)$.
We can solve this numerically by discretizing in $x$ to get a set of ODEs in $t$. Let
$$u_i(t)=u(x... |
I am wondering if there is a well-known transformation allowing one to solve convex optimization problems of the form
$$\begin{array}{ll} \underset{x}{\text{maximize}} & r^T x\\ \text{subject to} & \mathbf{1}^T x + \displaystyle\sum_i f_i\left(x_i\right) \leq 0\end{array}$$
where the penalty consists of convex losses
$... |
Many grants require an official record be kept of day-to-day research activities. For experimental research groups, this is often accomplished with a bound paper notebook in which the experimental details, troubles, and possibly a few key results can be written (or sometimes even printed off and taped in).
Some electro... |
I was using an edge (vector) finite element to solve electromagnetic diffusion (two-dimensional cases). The element that I used was a triangular element. I have got the result of the finite element in each edges element of the triangular element. But I don't know how to extract the value interior the triangular element... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.