instruction
stringlengths
43
28.1k
I'm looking for the reference of the high explosive material model in LS-DYNA, which is represented by keyword MAT_HIGH_EXPLOSIVE_BURN. The theory manual has an entry for this material model but it is quite vague and does not point to a good reference. Does anyone know a good literature behind it?
I've created a JavaScript file to execute and log average energy and magnetization values of 2D lattice classical Heisenberg model. I run the simulation with parameters, L=32 (Number of atomic spins on each side of the lattice) N=L*L (total number of spins) J=1 (exchange constant) T=0, 0.25, ..., 4.75, 5.00 (temperatu...
I tried to solve the 2D heat equation with the finite element method, using triangles as elements. Currently generated by a Delaunay triangulation. The base function I'm currently using is basically just the first barycentric coordinate. Assuming a triangle with $a, b, c$ as vertices: $$ f(x, y) = \frac{(b_y - c_y) (x ...
I am trying to have a Python code for the following nonlinear BVP: $$\frac{\partial N}{\partial t}=\frac{\partial^2 N}{\partial x^2}+N(1-N)-\sigma N$$ $$N(0,x)=\sin(2\pi x)$$ $$N(t,0)=0 \hspace{3mm}N(t,L)=0 \hspace{1.5mm};\hspace{2mm}t>0,0<x<L.$$ Without the non-linear part I discretize with explicit FTCS method. $$\fr...
I have a $D$-way tensor of dimensions $n\times n \times \dots \times n$ $(D)$- times. I want to sum the First vectors in all directions. For example, let $\boldsymbol{H}$ is 3-way tensor of dimensions $n \times n \times n$. Then the desired output, $Res = \boldsymbol{H}(:,1,1)+\boldsymbol{H}(1,:,1)'+reshape(\boldsymb...
I am trying to understand the basic LOBPCG algorithm, as used in popular python libraries, primarily from the suggested resource on wiki. LOBPCG involves a subroutine to compute the coefficients of the orthonormal basis. This computation is equivalent to another eigenvalue problem; it is equivalent to finding the optim...
from sympy import * from sympy.abc import A,B,C,D,E,F,x,y,U,V,W,X,Y,Z curve = A*x**2+B*x*y+C*y**2+D*x+E*y+F Now that we know such codes above will form the polynomial curve like $$A x^{2} + B x y + C y^{2} + D x + E y + F$$ However, the six terms of the polynomial are sorted only relevant to the upper cases. To be su...
Let us say that I have a $3 \times 3$ matrix $\bf X$, that has to be reshaped into a vector and rearranged as follows: $$ {\bf v} ({\bf X}) = \begin{bmatrix} x_{22} & (x_{23}+x_{32}) & (x_{21}+x_{12}) & x_{33} & (x_{13}+x_{31}) & x_{11} \end{bmatrix} $$ where the indices indicate the position of the elements in the ma...
Currently, I use Eigen3 for linear algebra operations on sparse matrices and either UMFPACK or CHOLMOD from SuiteSparse to solve sparse linear systems. However, as my model grows larger and the need for iterative methods to solve nonlinear equations arises, I am facing a bottleneck in the code's performance, particular...
Hypothetical question for some code that I'm writing. Suppose I have an matrix-free linear operator $A$, i.e. the only thing I know about it is the forward action $v \mapsto Av$. For simplicity, let's further assume that $A$ is symmetric positive definite. Are there any methods that would allow me to generate a 'decomp...
The real-life problem Assume I put a spherical roast with initially constant temperature of start_temp=25 (°C) into an oven with oven_temp=80. A meat thermometer is inserted at the core. At what time will the roast be ready, i.e. at target_temp=57? No discussion about rare or well-done, please, this is serious science....
So far, I have been looking into linear and nonlinear differential equations(Boundary value problem) that look like the following: $\frac{d^2 \theta}{dz^2} + \sin(\theta) = 0$ I am now familiar with numerical methods of using finite difference or finite element methods to approximate the derivatives and Newton's method...
I'm trying to write a very simple simulation of volume/water displacement. Every timestep a sphere gets lowered a bit further into a cylindrical container filled with water. While the physics behind this should be quite clear, I just can't wrap my head around how I would go about calculating the change in water height ...
For a FEM simulation of a Neo-Hook solid model, how do we know we are in the "regime" of nonlinearity of the solid? In other words, how do I know the hyperelastic material law is really used, and not just a needless additional computational cost because it can be modeled with a linear elastic Hook law. Following these ...
How or where can I find the mass matrix of a 10 nodes tetraedron element for FEM computation? Every nodes has 3 dof (x,y,z) so that the element has 30 dof. The Stiffness Matrix is a 30x30 matrix and the Mass matrix should have the same dimensions
What is the name of the numeric data type where a float has its exponent bits replaced with another floating point value to use as the outer float's exponent? This is a tip-of-the-tongue problem, as I recall having a casual conversation with a friend of mine on exotic data types. A normal float may be constructed from ...
The data type is a doubly unsigned float. This is where the value and exponent are both strictly positive. The range of this number should include $0$ and $[1, ~2^{\text{exponent}})$, skipping all values between 0 and 1. My use case for this would be implementing a certain incremental game (Cookie Clicker) for an older...
I'm trying to use this method Plot 2D piecewise constant in matlab in a finite elements mesh for my data. However, I have problems with the values of n1, n2 and n3. I guess this is why it doesn't show a figure for what I have written. What values would be appropriate for n1, n2, n3?
The Stokes equations are $$-\Delta \mathbf u + \nabla p = f \text{, in }\Omega,$$ and $$ -\nabla \cdot \mathbf u = g, \text{ in } \Omega$$ where $\mathbf u = \left( u, v \right)$ is the flow velocity, and $p$ is the pressure. I tried to solve the equations by the finite difference method and marker-and-cell scheme, a...
I have a silly question. Is it always more computationally efficient to use iterative methods to solve for some matrix $A$, $Ax=b$, where $x$ and $b$ change but $A$ stays constant, compared to computing the inverse $A^{-1}$? The rationale for computing the inverse would be that after computing the inverse it can be reu...
I've been working with Tensor calculus using the Python module PYTEARCAT. (See: https://arxiv.org/abs/2106.15016 and https://github.com/pytearcat/pytearcat.) It calculates quantities such as the Ricci curvature and Einstein tensor from a metric tensor, and this part works just fine for me. However, I can't seem to find...
Correct me if I am wrong, but I take it that people actually think the classic Lorenz system is fully characterized, i.e. we know what the attractor looks like and the various fractal dimensions of it, and it's always (with all parameters fixed; no bifurcations) going to be deterministically chaotic (with a thin fracta...
I am comparing reflectance intensity of silicon structure with a hole. I am getting oscillating solution for 0 roughness factor in equation based model. but spectrum shape of fdtd and equation based model solution starts matching if i increase the roughness factor. does this mean there is some default roughness factor ...
I was attempting to solve the diffusion equation for a solid sphere using a naive FDM scheme. The governing PDE for the scalar concentration field $u(r,t)$ is $$ u_t = r^{-2}(r^2 \alpha u_r)_r, \quad r \in [0,1], $$ and is accompanied by the boundary conditions $$ u_r(0,t) = 0, \quad u(1,t) = 0 $$ The initial condition...
Consider a high-dimensional ODE, which comes from semi-discretization $$ \frac{d\mathbf{u}}{dt} = f(\mathbf{u}), \qquad \mathbf{u}\in\mathbb{R}^N \tag{1} $$ If we want to build Reduced Order Models (ROM), we typically say $$ \mathbf{u} = \mathbf{u}_{ref}(\mathbf{x}) + \mathbf{\Phi}{\mathbf{\hat{u}}}, \qquad {\mathbf{\h...
I want to sample from a bounded space, say $[0,1] \times [0,1] \in \mathbb{R}^2$. I have read about a so-called grid walk that fixes a starting point $x_0 = (x_{0,1}, x_{0,2})$ and then proceeds via $x_{t+1}= x_t + \epsilon_t$ for MC draws indexed by $t$. What is the advantage of this scheme relative to sampling like $...
I am trying to solve numerically the flow of a gas through a porous, spherically symmetric body. The non-dimensional equations read: $$ \frac{\partial\rho}{\partial t}+\tau\frac{1}{r^2}\frac{\partial}{\partial r}\left(r^2\rho v\right)=g_P\\ v=-\frac{\partial \rho}{\partial r}\\ $$ where $\rho$ is the gas density, $t$ t...
I am using Spectra to iteratively solve large-scale eigenvalue problems. I like it because it readily works on windows, and is header-only. I would like to know if it supports complex-valued matrices. Here is a list of eigensolvers that lists Spectra and says it supports both real and complex problems. But the API Docu...
Given a matrix $P\in \mathbb{R}^{n*k}$ (just for ease of notation, no matrix or linear algebra is actually needed; bound to $(0,1)$ if necessary), select one number from each row and compute the sum. Find the choice that the produced sum is closest to a given number $x$. $$ \arg\min_{1\leq j_1,\cdots,j_n\leq k}{|x - \s...
I am interested in solving the following minimization problem: $$ \begin{array}{cl} \displaystyle\min_{x,y}&\displaystyle\frac{1}{K}\sum_{i=1}^{K}\left(\frac{x_{i}}{y_{i}}-\frac{X}{Y}\right)^{2} \\[0.4cm] \mathrm{s.t.}&\sum_{i}x_{i}=X \\[0.2cm] &\sum_{i}y_{i}=Y \\[0.2cm] &x_{i}\leqslant y_{i},\quad i=1,2,\ldots,K \\[0....
Currently, I'm working on a mechanical mechanism where nodes are connected via beams. This is very comparable to planar truss mechanism analysis, but in my case, the deformations are large (relative to the mechanism). Instead of deforming beams, for which Hooke's law is often used, my beams act as (linear) springs, whi...
For a hyperelastic problem, I understand the variational formulation can be written as the minimisation of $\Pi$ with $\Pi = \int_{\Omega} \psi( \pmb{u} )dx - \int_{\partial\Omega} \pmb{T}\cdot \pmb{u} ds$ With $\Omega$ the reference configuration, $\pmb{u}$ the displacement, and $\pmb T$ the traction force on the ref...
I'm working on a research project with my professor where we're trying to figure out how to determine the necessary semiconductor composition for a solar cell to have a particular bandgap in order to maximize the power efficiency. Specifically, we're attempting to simulate the effect of using alternating layers of AlG...
I have the following quadratic problem: $max$ $a^Tx+0.5x^TAx$ $s.t: 1^Tx=1$ in which $a=[a_1, a_2,...,a_n]$ is a non-negative vector, and $1^T=[1,1, ..., 1]$. The hessian matrix $A$ has the following structure: \begin{bmatrix} -n\alpha\beta/a_1&\beta_{12}&\beta_{13}&...&\beta_{1n}\\\beta_{21}&-n\alpha\beta/a_2&\beta...
I want to write a function $f$ and it is defined as $f = - \nabla \cdot(|\nabla u|^{p-2} \nabla u) $ and I exact solution $u(x) = \tilde{u}(r) = 1 - \frac{p-1}{p-2} \left( s^{p/{p-1}} - (1-s)^{p/{p-1}} + 1 - \left(\frac{p}{p-1}\right)s \right)$ if $r<R$ and 0 if $r \geq R$. The following is the code block where I defin...
I'm currently working on the 3-body problem, and I was writing a code to plot the trajectories of all 3 bodies while also manipulating the angular momentum of the system. I found a code online and tweaked it a little bit to match what I want. I was successful in plotting their trajectories; however, I couldn't measure ...
I've been trying to create a box mesh in gmsh with a structured and refined layer in the middle, here is the .geo code for it: lc = 100.; Mesh.CharacteristicLengthFromPoints = 1.; Mesh.CharacteristicLengthExtendFromBoundary = 1.; Mesh.CharacteristicLengthFromCurvature = 1.; Mesh.CharacteristicLengthMin = 10.; Mesh.Char...
I am trying to do a 2D simulation of the classical XY model in order to observe vortexes in the system. I am not really interested at the moment in calculating variables such as Magnetization because i am struggling to evolve the model. Probably because of the update step misinterpretation. Here is how i proceed, keepi...
I've been searching the whole afternoon for some documentation or code sample showing how to assemble a sparse matrix of a problem to be solved with PaStiX, but couldn't find any. The relevant module seems to be SPM, but its documentation is missing in the manual. Besides, the official examples load a matrix from disk,...
I've just started a project, trying to do simulation of electrodynamics using the well-known Maxwell equations: $$ \nabla \cdot \mathbf E = \rho \\ \; \\ \nabla \cdot \mathbf B = 0 \\ \; \\ \nabla \times \mathbf E = -\frac{\partial \mathbf B}{\partial t} \\ \; \\ \nabla \times \mathbf B = \mathbf J + \frac{\partial \ma...
I want to understand how important it is that I learn to write decent C++ code, for the sake of a career in scientific computing (FEM, fast solvers, etc). By this I mean that I want to acquire skills that are in demand and that are reusable. From what I hear, C++ is difficult to master, and I imagine that once I know h...
I'm currently playing with the surface mesh parameterizations of the C++ library CGAL. For a mesh with a boundary, the computed uv-space (parameterization domain) is either a disk or a square, and so it is easy to deal with. I use the parameterization to map a texture to my meshes, for example a checkerboard: But for ...
I want to simulate 1D diffusion with a constant diffusion coefficient using the Crank-Nicolson method. $$\frac{\partial u (x,t)}{\partial t} = D \frac{\partial^2 u(x,t)}{\partial x^2}.$$ I take an average of the approximations at the points $(x_i, t_j)$ and $(x_i, t_{j+1}):$ $$\frac{u_i^{n+1} -u_i^n}{\Delta t} \approx ...
I have an msh file, which is generated from a third party software(Pointwise). The geometry is a complex cylindrical pipe like structure with lot of branches. I need to refine the mesh further only on the wall region alone. How can i do this, without an .GEO file for the corresponding mesh. ( The GEO file is also very ...
Is it possible to estimate whether automatic differentiation (AD) techniques could enable a more efficient way to repeatedly compute the derivative $\delta L / \delta u^*_{ij}$ of a specific loss function $L$ than using an analytic expression? Here, I consider the specific loss function, $$ L(U) = \sum_{n=1}^N (U^\dagg...
I've been trying now for quite some time to numerically solve the nonlinear water wave equation [Craig and Sulem, JCP (1993)] by using FFT to discretize the space. I present my code below. By testing different aspects of the code, I have narrowed down the problem to the implementation of Dirchlet-Neumann operator (DNO)...
I'm new to gmsh. I would like to produce a mesh of quads where some nodes are shifted. I managed to have construct a structured mesh of quads. However, I would like now to shift some of the points to produce the mesh i'm interested in as in the figure Can someone help me? or have any different idea on how to do this? ...
In the textbook definition of the stress tensor it is defined at each point in space and therefore position dependant. When three dimensional periodic boundary conditions are used, I have seen it often, that a stress tensor is given for the entire material which is of course not position dependent anymore. (Electronic ...
I am trying to generate the .pp and .cube file using pp.x -i (input file name) command. But, the .cube file is not getting generated and the output.log file also shows an error message. this is my pp.x input file: &INPUTPP prefix='cspbi3' outdir='relax-bulk' filplot='CsPbI3_pristine.pp' plot_num=11 / &PLOT nfile=1 file...
I am looking for a way to numerically solve the Naiver-Stokes equations for steady incompressible flow using FDM over a surface with various angles?
I have a very long time series $f(t)$ (hours) dataset taken at a very high sample rate (250 MHz) and would like to understand its frequency structure at many different frequency scales (from milli-Hz to 100 MHz). Naively taking a Fourier transform of the whole data would give unnecessarily noisy results (too many point...
The max-cut algorithm divides a graph into 2 subsets, for instance: While I understand the algorithm, I do not quite understand the meaning of the result. In the above picture, what does the groupings of black circles vs white circles mean? If these lines were internet connections between different locations, what do ...
I need to simulate magnetic field of corrosion in my project. How can we simulate two different module both magnetic field and cathodic protection in comsol.
I'm working on an orbital body simulation as a personal project. I understand that it's not going to be as good as professional software, but I'm wondering what contemporary, general purpose, iterative, professional software looks like. What kind of methods are used? How accurate are they? What kind of runtime efficien...
Let's say we have the the weak form laplace problem Find $u$ $\in$ $H^1$ what satisfies \begin{equation} \int_\Omega \nabla u \cdot \nabla v \, d\Omega = \int_\Omega f v \, d\Omega \end{equation} for all $v$ $\in$ $H^1_0$ To find an approximate solution we project on a subspace $V \subset H_1$. Let's say $V$ is the ...
In my reading on various aspects of FEM, Petrov-Galerkin methods often arise in the study of solutions of convection-dominated systems, such as Hughes' work on Navier-Stokes, or systems where optimal test spaces or test bases are desirable, for example, some of the discontinuous PG work of Demkowicz, and least-squares ...
This is my first time asking a question here, so please tell me if I have made a mistake or if anything is unclear. I am working on my high school research project on the motion of a ball falling through flowing water and derived eq. 1. $b$ is the height of the ball in the situation. This equation was derived by addin...
Considering the following COO sparse matrix format, with repeated indices: std::vector<size_t> rows{0, 0, 1, 2, 3, 4}; std::vector<size_t> cols{0, 0, 1, 2, 3, 4}; std::vector<double> values{2, -1, 2, 3, 4, 5}; that represents the matrix \begin{equation} \begin{bmatrix} 1 & 0 & 0 & 0 & 0 \\ 0 & 2 & 0 & 0 & 0 \\ 0 & 0 &...
Does anyone know good literature about thermal-hydro-mechanical (THM) coupling in Abaqus? In particular, I would like to know the theory behind the C3D8PT element. Thanks.
I'm not entirely sure whether this question belongs here or in DSP but I think this is the proper site. I'm following these videos (first video, second video) to calibrate a camera for photogrammetry using Scilab. The method is pretty simple but I can't get proper results. I'm not sure whether I have misunderstood some...
I’m currently developing a FDM/FVM (using contravariant coordinates) code using Fortran and Co-Arrays (SIMD, in general), and so far I have all sparse matrix (BiCGStab, working on AMG) solvers and data-structure (CCS) libaries developed and working (I think), but so far I haven’t come up with the correct abstraction fo...
I am trying to solve the Orr-Sommerfeld equation numerically, using the techniques given in this article. This leads to solving a generalized eigenvalue problem, that is, given two matrices $\mathbf A,\mathbf B$ with possibly complex entries, we would like to find a pair $(\lambda,\boldsymbol v)$ where both $\lambda $ ...
I am currently trying to solve Nozzle Flow problem from JD Anderson Book. Here's my entire python code - import numpy as np import matplotlib.pyplot as plt nx = 31 x = np.linspace(0,3,nx) dx = x[2] - x[1] gamma = 1.4 gamma_inverse = 1/gamma; nt = 20 cfl = 0.5 #initial profile rho = 1 - (0.3146*x) T = 1 - (0.2314*x...
I have a tridiagonal antiHermitian matrix ($-i*Hami*t$) with nonzero elements only along the upper diagonal and lower diagonal, and the goal is to know the action of exponential of such matrix on a given vector. Currently, I am using scipy.sparse.linalg.expm_multiply function in Python to check the action of a million ...
I need to solve a nonlinear ODE of the form $$ \frac{d^2 y}{dx^2} + \frac{1}{x}\frac{dy}{dx}-\frac{1}{x^2}\sin(y)\cos(y)+\frac{2}{\alpha}\frac{\sin^2(y)}{x}-\sin(y)=0 $$ numerically, subject to the boundary conditions $$ y(0)=\pi,\, y(\infty)=0 $$ I'd prefer to do this in python, but I'm having a lot of trouble zeroing...
I've coded a framework that can be used to simulate the dynamic behavior of a system discretized by particles (nodes) that are connected by spring-damper elements. However, I want to compare it to a method that directly solves the equilibrium position of such a discretized system. I've identified the Direct Stiffness M...
i am trying to write a julia code for linear elasticity in my case i dont have body force and traction but there is a nonzero drichlet bc(ubc) i want to engage the bc in weak form in linear part. is my linear and bilnear part as below a = ε(v) ⊙ σ(u) b = ubc * ε(v) ⊙ σ(v)
I am asking this here for the possibility that someone here is familiar with OpenMP offloading. Is there some other way to parallelise Fortran array operations outside of unrolling the loops of the array operations? I know for multithreading !$omp workshare seems to work but not for target regions. An example piece of ...
Page 460 of Numerical Optimization by Nocedal and Wright contains the following algorithm under the name projected conjugate gradient However, Jonathan Richard Shewchuk list what seems to me to be the same algorithm on page 46 of his classic "An Introduction to the Conjugate Gradient Method Without the Agonizing Pain"...
I am doing an MPM simulation of water colliding against a solid, I am currently encoding the model for collision forces and I am realising something isn't clicking. Let us assume the fluid experiences no friction from the solid itself, only viscous forces. The fluid we will assume has a density of 1 g/ml. The solid has...
I would like to know if the following discretization is correct. Here D is the dispersion, C is the concentration. Both D and C are varying with space. Here n+1 represents the unknown time level. I was trying to implement a second-order implicit finite difference scheme. After applying the product rule, I discretized ...
I have a physical function $f(x)$ which I intend to measure. Problem is that I cannot read it directly, but through a response function $g(x)$ which is known to me with great accuracy and any one measurement is actually a convolution $M(y) = \int f(x)g(y-x)dx$. What is known about $f(x)$ is that its sharply peaked arou...
Say that I have a generalized eigenvalue problem of the form $$Ax=\lambda Bx.$$ Using MATLAB, some naive ways that one may solve this is by either directly inverting $B$ then applying the eig function in order to compute the eigenvalues and eigenvectors, or simply applying eig to both matrices i.e. eig(A,B). The is...
So I have this code where I am designing a hollow hemispherical shape and I want to create a 3D volume to input it into FEBio software. I am using delaunay triangulation for meshing. But the problem is when I rotate to see the bottom, I am seeing is that there are triangles there of this 3D model as shown below How d...
I have a set of measurements $y_i$, $1 \leq i \leq N$, and I want to model these measurements with a linear model. I have two possible models I can use, $$ y \approx A c $$ and $$ y \approx B d $$ where $A$ is $N$-by-$P$ and $B$ is $N$-by-$Q$. The vectors $c,d$ are unknown coefficients that I would determine with a lea...
I am using MLS-MPM to simulate both solid and fluids. It works, but the amount of time steps I must do for hyperelastic solids is absurd. To give you some perspective, I am able to simulate just the fluid at interactive speeds (60 fps) using only one simulation step per frame. The fluid simulation is just extremely sta...
Here is the code that I am trying to run: syms z_1 z_2 m_1 m_2 x y Q p s t m_1=0.01; m_2=249; x=5; y=5; Q=0.6; p=0.5; s=0.04; t=0.25; func=(62001*sinh(y/100 - z_2/100))/(100*cosh((249*cos(2*pi*(z_1 - x + 1/4)))/2 +249))-(249*sinh(249*y - 249*z_2))/(10000*(cosh((249*cos(2*pi*(z_1 - x + 1/4)))/2 + 249) - 620009999/10000)...
I have the following heat diffusion equation: \begin{alignat}{3} \partial_t u(t, \vec{x}) &= g(\vec{x})\Delta u(t,\vec{x}), &\quad& \vec{x} \in\Omega, \, t\in(0,\infty],\\ \partial_n u(t,\vec{x}) &= 0, &\quad& \vec{x}\in\partial\Omega,\, t\in(0,\infty], \\ u(0,\vec{x})&=f(\vec{x}), &\quad& \vec{x}\in\Omega. \end{aligna...
This is a question to all scientific programmers out there that have experience in academia, industry, ideally both. Consider two figures: Alice has earned a PhD in applied mathematics at a top 10 university, she has two publications in rather good journals, and had to write a certain number of python programs to prot...
I'm learning about the lattice Boltzmann method (LBM) and how it can be parallelized. On Wikipedia, they say, "The LBM was designed from scratch to run efficiently on massively parallel architectures...", with no citations. I understand the basics of LBM (collision, streaming, etc), but I'm struggling to see how it can...
I am trying to understand how to use the improved euler method on MPM simulations. In the kind of MPM simulation I am doing with forward euler the order of operations is as follows: Write particle material properties (i.e. mass) into the discrete gird cells. Read the material properties from the grid to compute materi...
Suppose I have the following function $$f(x,y,z1,z2)=g(x-z1,y-z2)$$ where $g(x,y)$ is a deterministic function from the $X\times Y\to S$ and $z1,z2$ are random variables following a known probability distribution. Now, I wish to plot the distribution of $f$ over the grid of $X\times Y$. How do I do this in SageMath? Sp...
I have an (maybe not so clever) idea to apply the shallow water model for computing the year-round watershed runoff of a catchment. It means using of real topography with variable slopes and roughness, length of the real time period about 31536000 seconds, real precipitation, temperature, snow cover and other data, etc...
i have f(x) that is concave function. My question is g=min(f(x)) is concave or convex? And max(g) is concave or convex? there is a theorem for this?
So there is a numeric technique for updating a deformation gradient in MPM that goes as: $$F_{n+1} = (I + \nabla \vec v \Delta t)F_n$$ This works for small time steps but for large time steps numerical issues ensue. One of the biggest issues is that I assume that the deformation matrix always has a determinant of one, ...
I need to integrate expressions containing powers of the function: Hb = U1.U2*U3.U4 + (permutations of the first term like U1.U3*U2.U4) + Determinant of the matrix [U1,U2,U3,U4]. The U's are 4D unit vectors on different sites, so site 1 has U1 = [ Cos(t21), Sin(t21)*Sin(t11)*Cos(p1), Sin(t21)*Sin(t...
I need to implement in C a method of obtaining transient solution of damped FE models based on modal results for a structural model (imported CAD geometry) defined with hysteretic (structural) damping. This method is also available in Matlab by using solve(model,tlist,"ModalResults",modalResultsVar); However, the main ...
I'm having difficulty solving an initial value problem (IVP) in Python backwards in time. The code is at the end of this post. First, please let me state my simplified problem. The forward IVP is defined as the following $$\left\{ \begin{array}{cl} u'(t)=-21 u + e^{-t}, & \ t\in[0,2] \\ u(0)=1 & \end{array} \right. $$...
I am trying to solve a nonlinear and discontinuous fourth order BVP using the solve_bvp function of SciPy. My equation is $y^{(4)}=cf(y)$, where $f(y)$ is a nonlinear function. This equation is solved in the domain $x\in(0,1)$, and $f(y)=0$ when $x>0.5$. Given the nature of the equation, it is proving out to be difficu...
Context: I have two 3D non-random matrices that have the same dimensions. These matrices represent satellite images with 1 band, so their values are strictly positive. They both present areas that have similar values, while areas without a "pattern" would have more varied values. Problem: Even though they might have si...
I am having difficulty deriving the Cauchy point of the horizontal subproblem $$ \overline{g}_k^T Z_k u + \frac{1}{2} u^T Z_k^T W_k Z_k u \;\;\;\;\mbox{subject to}\;\; \mid \mid Z_k u \mid\mid_2 $$ given in equation (1.5.9) of page 60 of this thesis as $$ -\alpha (Z_k^T Z_k)^{-1} Z_k^T \overline{g}_k $$ From the littl...
When using the eigs function in MATLAB, which is based off of ARPACK, one can manually modify the maximal dimension of the constructed Krylov subspaces, the maximum iteration counts, and the error tolerance. The defaults are min$(2k, 20)$ (where $k$ is the number of requested eigenvalues), $300$, and $10^{-12}$. Depend...
In snes/tutorials/ex13.c, there is a function SetupPrimalProblem(), which sets up the $f_0$ and $f_1$ in PetscDSSetResidual() as described in here, and also the boundary conditions using the exact solution trig_inhomogeneous_u(). Now, I am trying to modify $f_0$, $f_1$, and the boundary conditions in order to solve the...
I am having some difficulty calculating Green's function symbolically in Python for $\phi^4$ theory. The specific rendition of the $\phi^4$ theory I have in mind can be written as follows. $\mathcal{L} = \frac{1}{2}(\partial_t \phi)^2 - \frac{1}{2}(\partial_x \phi)^2 - \frac{1}{2} m^2 \phi^2 - \frac{1}{4!} \lambda \phi...
I am trying to compute numerically the Lyapunov exponents of an ODE. I follow the method described in Parker, Chua "Practical Numerical Algorithms for Chaotic systems" There is also relevant answer here Numerical computation of Lyapunov exponent Below is my code. It gives wrong values for the Lorenz system at classical...
I am using FreeFEM++ to simulate the cylindrical waveguide, but no reasonable solution is returned. Here I'm using the 94 GHz light ($\lambda$ = 3.17mm) as input, and radius of the waveguide is 1.27mm. If more information is needed to be posted, just reply and I will provide it as soon as possible. UPDATE: As is point...
So, I've been attempting to design a simple solver for a problem of finding the gravitational potential of a system using Poisson's equation (let's call the potential phi, $\phi$). The goal is that I apply this potential to the system, move it forward one time step, and then repeat. Right now, I am working with a perio...
I have some data which consists of an exponential process in time convolved with a gating function. I am fitting the underlying exponential using the least squares method. (I also have experimental data for the gating function itself that I convolve with perfect exponentials to get the "fit" and find best parameters to...
I'm trying to figure out how a magnet affects the trajectory of a particle travelling near the speed of light downwards toward the ground. The equation for the force of the magnetic field is pretty difficult to solve, so I'm using Euler's method to approximate it. However, no matter how many timesteps I give Euler's me...
Corner singularities cause instability of finite difference solutions. They occur at the intersection of boundary conditions. I was recently going through an online video course that was explaining how to use the staggered grid and the marker and cell algorithm to solve the lid-driven cavity Navier-Stokes equations. Th...