Questions tagged [numerics]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
23 views

Questions on the theory of distributed numerical algebraic computation

I'm trying to build a pure python distributed numerical algebra computation kernel based on GPU. but after I've learnt most of the software engineering, I realise that I'm seriously lacking in ...
Haitao Xiao's user avatar
0 votes
1 answer
78 views

Using Crank-Nicolson to solve Non-Linear Schrödinger equation in Python

I aim to solve the (non-linear) Schrodinger equation using the Crank-Nicolson method in Python. Here are my two functions. ...
FairyLiquid's user avatar
0 votes
0 answers
35 views

recommendation on some papers/books about frontal solver used in FEM

I'm reading a program about computational plasticity, this program use frontal solver to solve the program, but I'm not familiar with frontal solver even after reading some papaers, so could you ...
吴yuer's user avatar
  • 21
0 votes
1 answer
43 views

How do you build a polyharmonic discrete system?

Polyharmonic equations, to my understanding, are defined as: $$\Delta ^k u = 0$$ i.e. one repeatedly applies the laplace operator to the function a certain number of times and the result must be 0. ...
Makogan's user avatar
  • 263
0 votes
1 answer
53 views

Discretization of generalized kinetic term in 2D Poisson partial differential equation

A typical 2D Poisson PDE is given as $$\nabla^2\varphi(x, y)=f(x, y)$$ where the Laplacian term, $\nabla^2\varphi$, can to some degree be interpreted as the kinetic energy (given proper scaling) (...
Akhaim's user avatar
  • 53
0 votes
0 answers
35 views

Perfect Conducting (PC) and Perfect Insulating (PI) boundary conditions for magnetic induction in MHD problems in cylindrical coordinates

I understand the computational implementation of the PC and PI bcs in cartesian case. In terms of the magnetic field components for PI, we have $B_x = B_y = B_z = 0$, and for PC, we have $\partial_x ...
myresh's user avatar
  • 1
0 votes
0 answers
32 views

Constructing generalized Laplacian matrix?

I am staring intently at this paper by Botsch and Kobbelt. In particular, I want to make the matrix specified in equation 5. I am trying to understand the specific computations I must instruct a ...
Makogan's user avatar
  • 263
0 votes
1 answer
75 views

Geometrical Nonlinearity in Abaqus

In Abaqus, there is an option NLGEOM to turn on the geometrical nonlinearity. But I'm not clear what it does specifically. Because it also works with UMAT written for small strain formulation, i.e. ...
kstn's user avatar
  • 229
0 votes
1 answer
61 views

Solve bivariate polynomial system

Given a bivariate polynomial system with variables $(x, y, z)$ like (1) $ f_1 = x * a_1 + y * a_2 + z * a_3 = 0 $ (2) $ f_2 = x * a_4 + y * a_5 + z * a_6 = 0$ (3) $ f_3 = x^2 + y^2 - 1 = 0$ how do I ...
Citizen3011's user avatar
5 votes
1 answer
727 views

Taking derivative using FFT

I would like to calculate derivative of a given function ( a 1D array) using Array. Here is the code ...
learning_physics's user avatar
1 vote
2 answers
90 views

Can I find sines or cosines of rational parts of π without using radians? If not, how do I reduce the errors caused solely by the transcendence of π?

this may be irrelevant for people who need fast code. But for me it's just the opposite -- i.e. in the specific situations when I know that the extra time allows me to make my calculations more ...
5-limit_JI's user avatar
3 votes
2 answers
130 views

Solving systems of advection-diffusion-reaction equations with finite element methods

I have been doing a lot of self-study on numerically solving PDEs so that I can solve system of linear and nonlinear Advection-Diffusion-Reaction (ADR) systems on complex meshes. I have been watching ...
krishnab's user avatar
  • 287
1 vote
0 answers
84 views

Stability for the 2d diffusion equation

I'm reading this set of notes on numerical stability of the diffusion equation. I can't seem to derive equation (7.17) from the previous equation. I've tried using $\sin^2(\theta)=\frac{1-\cos(2\theta)...
NNN's user avatar
  • 623
1 vote
2 answers
446 views

PhD in scientific computing to be a scientific programmer

Intro and disclaimer: this question concerns developing a career in Scientific Computing in industry, starting from an (applied) mathematics background, say an MSc. It definitely arises from my ...
hahn76's user avatar
  • 243
0 votes
1 answer
83 views

Deformation matrix, Math hack for stability on large simulation steps?

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 ...
Makogan's user avatar
  • 263
1 vote
1 answer
88 views

Improved euler on hybrid methods where both time and space are discretized?

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 ...
Makogan's user avatar
  • 263
3 votes
0 answers
78 views

Verlet integration on grids or how to get better stability in hyperelastic simulation

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 ...
Makogan's user avatar
  • 263
2 votes
2 answers
241 views

How to plan convoluted measurements

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 ...
i_prob_should_know_this's user avatar
1 vote
1 answer
96 views

Isolating decaying solutions to nonlinear second-order ode

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 ...
Ali Shakir's user avatar
0 votes
2 answers
147 views

Approximating the solution of a non-linear ODE using Python

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 ...
user1193197's user avatar
6 votes
1 answer
115 views

Numerical artefacts in solution of spherical heat equation using FDM

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 ...
IPribec's user avatar
  • 454
4 votes
1 answer
132 views

Is there a way to generate a matrix-free decomposition for a matrix-free operator?

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 ...
TrostAft's user avatar
  • 141
2 votes
0 answers
61 views

When is Lanczos tridiagonalization accurate?

Suppose that we are given a random, symmetric matrix $A$, and a random vector $q$. For concreteness, assume the dimensions of $q$ and $A$ are both $1,000$. I would like to use the Lanczos algorithm to ...
miggle's user avatar
  • 41
2 votes
1 answer
111 views

How to numerically solve differential equations involving sines, cosines and inverses of the unknown function?

I'm very new to finite difference method and I am just introduced to methods of solving differential equation using finite difference method via sparse matrix method. I find that the main idea is to ...
Hari Sam's user avatar
0 votes
0 answers
19 views

MPM course, implicit updat clarifification

In the 2016 SIGGRAPH notes on MPM the authors explain how to do an implicit update in section 11.4 throguh by this formula: It is not clear to me what the $j$ is over in this case (for eq 202), is it ...
Makogan's user avatar
  • 263
1 vote
0 answers
77 views

Why do we use modified pressure in incompressible multiphase solvers with gravity?

The context of my question is two-phase incompressible solvers such as interFoam in OpenFOAM, but I have seen this trick used ...
Robert Manson-Sawko's user avatar
0 votes
0 answers
30 views

MPM implicit integration

Setup I am having a hard time translating the formulas in the 2016 MPM course from siggraph into algorithmic computations. In particular we have equations 200 and 201 $$h(v^{n+1}) = Mv^{n+1} - \Delta ...
Makogan's user avatar
  • 263
1 vote
0 answers
37 views

How can i study stability for a new method that solves second degree non lineara differential equations?

I developed a new method to solve this equations $\frac{d{y}^{2}}{dx^{2}}=g(x,y,\frac{dy}{dx})$ for a general g(x,y,z), wich their solution is a function f(x)=y. Obviously you need $y(x_0)=y_0$ and $y'...
martín canullán's user avatar
0 votes
0 answers
63 views

Encountering blow-up when solving the one-way heat equation using Lax-Wendroff

This is my first time attempting to implement a finite difference method for a PDE in Python, and I am having a bit of trouble. The PDE I am trying to solve is as follows: $$ \begin{cases} ...
Leonidas's user avatar
  • 153
0 votes
0 answers
36 views

What is meant exactly by the domains in this context and how can I simulate their size?

I was working on a problem from "Computational Physics using python: Chapter 17." The problem is concerned with simulating the thermodynamics behind the spin of electrons and the resulting ...
Belal Bahaa's user avatar
2 votes
1 answer
118 views

How do the navier stoke equations model materials who "forget" their original form?

Sorry for the screenshot but I don't want to try to format this on latex: We have this annotation of the Navier-Stokes equations: I am particularly puzzled by the viscosity/stress term. For an ...
Makogan's user avatar
  • 263
0 votes
0 answers
54 views

Numerical method for space fractional derivative in 1 dimension

I am very new to the subject of fractional derivatives which arise while characterizing the anomalous transport of passive scalar in turbulence. I have found an equation of the following form, to ...
Sayan's user avatar
  • 87
0 votes
0 answers
32 views

Matrix for Marker and Cell grid?

I have an assignment question that reads: Show that the combined matrix for the Marker and Cell (MAC) grid for velocity and pressure for the steady Stokes equations is symmetric. You can consider the ...
Makogan's user avatar
  • 263
3 votes
1 answer
156 views

Numerical scheme for the level set equation that solves inverse mean curvature flow problems

I am considering the problem of simulating the evolution of an interface given as a curve in 2D (or surface in 3D) that evolves according to a velocity specified at the interface of the form: $$\vec{v}...
B0bby31's user avatar
  • 33
1 vote
1 answer
100 views

How to design a sin and an arcsin function such that arcsin(sin(x))=x, where x is a finite precision floating point number

As commonly known for programming on computer, if x is a finite precision floating-point number such as double/float in C language, arcsin(sin(x)) is usually not equal to x due to the numerical issue. ...
user3677630's user avatar
1 vote
0 answers
90 views

Solving 2D Poisson equation with mixed boundary conditions in Python

I am trying to numerically solve the Poisson's equation $$ u_{xx} + u_{yy} = - \cos(x) \quad \text{if} - \pi/2 \leq x \leq \pi/2 \quad \text{0 otherwise} $$ The domain is the rectangle with vertices ...
user82261's user avatar
  • 119
2 votes
0 answers
110 views

Solving 2D Poisson equation with Dirichlet boundary conditions in Python

I am trying to solve the following PDE: $$ \begin{align*} u_{xx} + u_{yy} = \begin{cases} - \cos(x) \quad -\pi/2 \leq x \leq \pi/2, \\ 0 \quad \text{otherwise} \end{cases} ...
user45217's user avatar
1 vote
1 answer
156 views

Storing Raw Simulation Data or Truncated Data?

I have a simulation that can generate quite a bit of data when it runs, for example $650\cdot 400 \cdot 400$ floating point numbers. Without compression, that's a few gigabytes worth if I want to save ...
cgbsu's user avatar
  • 33
0 votes
1 answer
59 views

Finite difference approximation error

I was reading Scientific Computin, An Introductory Survey, by Michael Heath. In the Example 1.11, he madr a Finite Difference Aproximation, with the usual approxination : $f’(x)\neq \frac{f(x+h)-f(x)}{...
RES's user avatar
  • 1
4 votes
2 answers
267 views

Chebyshev/Lagrange polynomials in spectral methods

I am currently trying to familiarise myself with (Pseudo-)Spectral Methods for solving differential equations. Now, I am struggling to understand some obviously crucial concept of this approach. The ...
Octavius's user avatar
  • 185
0 votes
0 answers
42 views

Are my boundary conditions in my stiffness matrix correct?

I am trying to find a P1 Lagrange finite element solution to the following ODE: $\begin{cases}-u''+u'+u=f~~~~~~~~\text{in}~~(0,1)\\ u(0)=1, u'(1)=0\end{cases}$ Where $f(x)=-2e^{x}+2\left(1-x\right)e^{...
user847197's user avatar
4 votes
2 answers
226 views

Faster than forward substitution?

I have a matrix of the form: $M:=\begin{pmatrix} S_1 & & & \\\ Q_1 & S_2 & & \\\ & ... & ... & \\\ & & Q_n & S_n\end{pmatrix}$ where the blocks ...
Lilla's user avatar
  • 127
1 vote
2 answers
158 views

C^1 continuous element for a triangle?

I am looking for an element for FEM that is piecewise $C^1$ continuous across triangles (i.e. $C^1$ continuous on the edge separating 2 triangles of the mesh). I have heard about the Bell element: ...
Makogan's user avatar
  • 263
3 votes
0 answers
96 views

A way to solve nonsmooth stiff ODEs

Let us considered the following ODEs \begin{align*} \dfrac{dX}{dt} = F(X), \tag{1.1} \end{align*} where the unknown $X\in \mathcal{D} \subset \mathbb{R}^l$ and it can be stiff. These ODEs can be ...
Tung Nguyen's user avatar
0 votes
1 answer
105 views

FreeFEM++ converting equation into code

I am trying to solve the following problem nuemrically: $$u_t = \Delta u + \sin t$$ To that effect I scanned the documentation of FreeFEM, the closest example I can find to my problem is the Thermal ...
Makogan's user avatar
  • 263
1 vote
1 answer
65 views

Solving a boundary value problem with variable number of coupled equations

Let's assume the equation $$ \nabla^2u_n(\vec{r})+a_n(\vec{r})u_n(\vec{r})=\sum_{m=1}^{N}b_{nm}u_m(\vec{r}),\quad n=1,2,\dots,N,\quad \vec{r}\in\varOmega\tag{1}\label{eq1}, $$ is to be solved for $u_n$...
Masa's user avatar
  • 194
0 votes
0 answers
94 views

Pyton get fem solving simple 2D differential equation?

I need to solve the differential equation: $$u_t = \Delta u + \sin t$$ On a 2D domain with homogeneous Dirichlet boundary conditions. Tod o this I am trying to use the python package getfem. I am ...
Makogan's user avatar
  • 263
1 vote
0 answers
70 views

Strategies to solve an equation with a polynomial and a numeric function

I have to solve numerically an equation of the following form: $$ \sum_{n=0}^m c_n x^n = f(x) x^k $$ Where the $c_n$ are real values, $k$ is an integer and $f$ can only be evaluated numerically. The ...
WIP's user avatar
  • 153
0 votes
1 answer
134 views

Solve 1st order ODE in using `scipy`

I've been trying to solve the following equation $$ y(t)=-A\cdot\frac{\mathrm{d} y}{\mathrm{d} t}+B\cdot\left(\frac{\mathrm{d} y}{\mathrm{d} t}\right)^{2}+C \\ y(t=0)=y_{0}\\ $$ where $A$, $B$, and $C$...
BackSpace42's user avatar
0 votes
0 answers
30 views

How is the transfer function of a state-space representation numerically computed?

This question is a duplicate of this question that I asked on dsp stack exchange. However, nobody had the answer there but the question seems more appropriate on this forum (If not feel free to tell ...
NokiYola's user avatar
  • 101

1
2 3 4 5
12