Questions tagged [discretization]
The process of representing a continuum space with a finite set of points/elements
170
questions
1
vote
1
answer
80
views
constructing a symmetric matrix for finite difference
I come across the following operator in a paper
$\mathcal{I}\psi = \psi_{xxxx} + (r~\psi_x)_x$,
where $\psi=\psi(x)$ and $r=r(x)$. Periodic boundary condition is employed. It claims that the operator $...
1
vote
2
answers
74
views
Can I use Q0 finite elements when there are gradients involved?
Could I apply a Q0-discretization to, say, the Poisson equation $\Delta \phi = f$ (where by Q0 I mean piecewise constant, and thus non-continuous, elements)?
Solving this with FEM, at least as I know ...
0
votes
0
answers
39
views
P1 Finite element discretisation of laplace-neumann eigenproblem
I am looking for help in the FE discretisation of the Laplace eigenkproblem with Neumann boundary conditions; that is,
$$-\int_{\Omega} \nabla u \cdot \nabla v= \lambda \int_{\Omega} uv,$$
or
$$Ax=\...
5
votes
1
answer
89
views
Are Python/MATLAB/Mathematica numerical eigenvectors affected by eigenvalue degeneracies outside region of calculation?
I have a discretized 2D mesh over which I calculate eigenvalues and eigenvectors of some
Hermitian 2 x 2 matrix at each point along a closed loop parameterized by parameter t. The eigenvectors are ...
0
votes
1
answer
68
views
Time & Space matlab discretization Finite Differences confusion
I have been trying to solve this equation and write the finite difference scheme in matlab for months, but I still am not successful.
Given the KdV Equation $$\tag{1}u_{t} -6uu_x+u_{xxx}=0$$
I have ...
0
votes
0
answers
33
views
Gridline cutouts after FFT and iFFT on Python
EDIT: I think I messed up on the coordinates of $(p,q)$. Num was missing a multiple of $2\pi/N$. Assuming my interpretation of DFT isn't wrong.
I am currently using FFT to run Fresnel Diffraction as ...
1
vote
0
answers
60
views
Good non oscilliatory derivatives for an exsisting grid
I'm calculating the entropy production of a shockwave by utilizing the equations:
\begin{equation}
\sigma = J'_q\frac{\partial}{\partial x}\left(\frac{1}{T}\right) +\frac{1}{T}\frac{4\eta}{3}\left(\...
1
vote
0
answers
228
views
How to compute the Eigenvalue and Eigenstates of Quantum well with Effective mass using finite difference method in Python?
I want to compute the eigenvalues and eigenstates of a quantum well with different effective masses of electron in the barrier and in the quantum well. As can be seen [1]: https://github.com/mholtrop/...
1
vote
1
answer
85
views
Discrete model of cell - cell communication
I am trying to understand how cell to cell communication is studied using a discrete modelling framework. Could someone please suggest suitable references or libraries which already have ...
3
votes
1
answer
97
views
Discretizing the viscous component in 1 - D Navier stokes compressive flow
I've been working on modelling the NS equations in order to simulate shock waves. The equations are set up on the form:
\begin{equation}
\frac{\partial U}{\partial t} + \frac{\partial F(U)}{\partial x}...
2
votes
1
answer
73
views
Dividing a continuous domain into small squares; how to perform storage and querying?
I recently had a software engineering interview and was asked a series of questions that was a bit outside of knowledge realm, and I feel like there's some scientific computing principles here (I took ...
3
votes
1
answer
78
views
Quantify difference between two discrete 1D solutions
I have an ordinary differential equation that is solved as an initial value problem using different numerical schemes. I end up with several discrete time signals that should display a reasonably ...
1
vote
0
answers
39
views
Procedure to convert continuous equations of motion to discrete version
Let's take a mobile robot and suppose we know its continuous equations of motion, for example this car-like simple model.
Now if I am simulating this robot in a continuous 2D plane, then coding the ...
0
votes
0
answers
55
views
Discretizing Multi-species Ion Exchange Equations by Finite Volume Method
I'm solving a system of multispecies ion exchange equations (diffusion+drift fluxes) in 1-d spherical domain using finite volume method to obtain the ion concentrations at the next time step. After ...
2
votes
1
answer
275
views
Tensor product representation for the 9-point finite difference approximations for the Poisson equation
If we use 5-point finite difference approximations in a uniform rectangular grid to solve the Poisson PDE
\begin{align}
-\Delta u &= f \ \ \text{en} \ \ (0,1)\times (0,1) \label{P1} \\
u &= ...
1
vote
1
answer
108
views
What is the rationale of second-order finite volume discretization?
When it comes to a second-order accurate finite volume discretization of Navier-Stokes equations, which one of the two following rationales is adopted?
1- Second-order accuracy is a direct consequence ...
4
votes
1
answer
87
views
Why do we have to resort to Higher order schemes for solving the 1-D advection equation/ continuity equation?
\begin{equation}
\begin{aligned}
\frac{\partial N}{\partial t} &+ \frac{\partial J}{\partial r} = 0, \\
\frac{\partial N}{\partial t} &+ \frac{\partial }{\partial r}(N \upsilon ...
7
votes
1
answer
201
views
Projection method FVM poisson part, adding source term
The idea of the method is to decompose the Navier-Stokes equation into the solenoidal and irrotational parts.
$$\frac{\partial u}{\partial t}+u(\nabla \cdot u)=-\frac{1}{\rho}\nabla p+\nabla ^2 u$$
...
0
votes
1
answer
143
views
Discretization of a non-linear ODE using FDM isn't grid indepenent
I am trying to solve the ODE :
$\frac{d^2T}{dx^2} = \omega_1 T+\omega_2 T^2$
+
using different numerical methods. I have tried the following discretizations so far and none of them seem to be grid ...
1
vote
0
answers
50
views
discretization of advection diffusion with variable coefficients
I am looking for help to find a somewhat stable FD numerical scheme for the advection diffusion equation posed on a curve $(x(r),y(r))$. The equation becomes
$$u_t=\alpha(r) u_r +\beta(r) u_{rr}+f(r,t)...
1
vote
1
answer
73
views
Rate of convergence - Stochastic Euler Method
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-...
1
vote
1
answer
91
views
Discretization of a nonlinear boundary value problem
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,
\...
2
votes
1
answer
125
views
FV Discretization of source term in 2D Poisson Equation
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 ...
2
votes
0
answers
47
views
In sights into why higher order finite differencing method leads faster to instability
I was playing around with numerically solving the 1D wave equation with density and stiffness varying with position using central differencing methods and noticed that for certain discretization steps ...
3
votes
1
answer
199
views
Choosing an appropriate time step for a discrete & continuous dynamics simulation
I have inherited of a flight dynamics simulation in C++ which represents a small drone with it's autopilot, actuator dynamics and a solid state IMU.
Hence, it is composed of a few models, some ...
0
votes
0
answers
45
views
How to solve for underlying function from discrete data set containing integral of that function
New to Computational Science, I hope I'm on the right exchange network for this question.
I have a time series data set that contains the sum of a source data set representing an exponential decay ...
2
votes
3
answers
302
views
Flux sign and face normal confusion in finite volume method
I implemented a solver for the 2D steady-state heat equation (without heat generation and homogeneous material) $\nabla. (k\nabla T) = 0$, using finite volume method, however, I am having some ...
3
votes
1
answer
155
views
FEM with elastic inhomogeneous properties leads to mesh-induced anisotropy
I'm solving an elastic homogenization problem and I'm having problems with mesh artifacts.
I would like to first give a brief summary of what I do: I have a system with inhomogeneous (but isotropic) ...
5
votes
0
answers
68
views
Why does the naive barycentric hodgestar fail?
The discrete exterior calculus is defined first using circumcentric dual cells, because the primal and dual edges are orthogonal and thus the dual cells are convex. This leads to a diagonal hodge star ...
0
votes
0
answers
68
views
The relation between PDE order and discretization order
In Jasak's Ph.D. thesis (2000), a notion is given about discretization of a transport equation:
For good accuracy, it is necessary for the order of the discretization to
be equal to or higher than the ...
6
votes
2
answers
317
views
Numerical flux and source term in FVM (Burger's like equation)
I'm trying to solve the following equation with FVM
$$u_t + f(u)_x = g(u)$$
where $g$ is some smooth function of $u$ and $f(u) = \frac{u^2}{2}$. This is really similar to Burger's equation, except ...
0
votes
1
answer
478
views
Solving differential equation in Python with discretized variable coefficients
I am trying to solve a differential equation with discretized variable coefficients which are calculated from a time serie.
In this case the Runge-Kutta step size is fixed by the frequency in the time ...
1
vote
0
answers
60
views
Can the standard multigrid performance be used for time-dependent PDEs?
Consider a time dependent pde(i.e u(x,t)).I know when only space-coarsening is used the standard multigrid performance can be applied but what if instead we use only time-coarsening?Can we apply the ...
4
votes
1
answer
172
views
Differences between Discrete Fourier Transform and Continuous Fourier Transform?
I am trying to visualize the time dependence of a free particle given an initial wave-function using Python and I just wanted to know if I could use the in built FFT implementation from NumPy to find ...
1
vote
0
answers
133
views
FDM discretization of equation on the boundary
In order to simulate the following equation using FDM
$$u_t(t,x)-u_{xx}(t,x)=0, \quad (t,x) \in (0,1)\times (0,1)$$
$$(u_t(t,x)-u_{x}(t,x))\rvert_{x=0}=0, \quad t \in (0,1)$$
$$(u_t(t,x)+u_{x}(t,x))\...
1
vote
1
answer
240
views
How to do Weierstrass-transform in MATLAB?
I have a diagonalization problem. I have the eigenstates correctly, and I want to do a Gaussian-smearing (Weierstrass-transform) on them. So I have the wave functions ($\Psi$), and the continuous ...
1
vote
1
answer
95
views
Is "Gradient Computation" in Finite Volume Discretization Really 2nd order accurate?
Based on this, pp 245, we go through these steps to discretize a gradient statement, namely $\nabla\phi$:
1- Gauss theorem reads,
$$
\int_V\nabla \phi dV = \oint_{\partial V}\phi dS
$$
2- Integral ...
2
votes
1
answer
53
views
Discretization with non-constant matrix containg entries form unknown vector
Consider a system of PDEs
$$
\begin{cases}
u_t = \nabla \cdot (D(u)\nabla u) + \frac{c}{K_U+c}u-ku\\
c_t = d_c\Delta c -\frac{\nu_U c}{K_U + c}u
\end{cases}
$$
with some boundary conditions. Here, $D(...
1
vote
1
answer
253
views
Approximation Error in a Finite Difference Approximation of the Square of Derivative
First Part: (First-order derivative)
Assuming $f$ is an infinitely differential function everywhere, the Taylor series of $f(x + h)$ at $x$ is
\begin{align}\tag{1}
f(x + h) = f(x) + hf'(x) + \frac{1}...
0
votes
0
answers
79
views
Analytic vs discrete understanding of PDE
The PDE I am working with:
$$\partial_tu = \nabla \cdot (a(x)\nabla u)-\beta(x)u\\
\partial_nu=0, x \in \Omega \subset \mathbb{R}^2\\
\beta(x)>0$$
Integrate the PDE:
$$\int_\Omega \partial_t u=\...
0
votes
0
answers
37
views
What will PDE discretization matrix look like for time and space? [duplicate]
Please note: this question is not a duplicate of this question since, while the PDE is the same, the nature of this question is different, i.e. the other question treats a different aspect of this PDE....
1
vote
0
answers
58
views
Discretizing a parabolic PDE with finite volume method
I want to discretize the following parabolic PDE:
$$u_t = \nabla\cdot(\alpha(x)\nabla u)- \beta u\\
x\in\Omega \subset \mathbb{R}^2\\
\partial_n u = 0\\
u(t,0) = u_0(x)\ge 0, \alpha(x)>0$$
Given ...
1
vote
0
answers
93
views
Determine truncation error of PDE discretization
The equation is $$\frac{\partial}{\partial x}\left(u\frac{\partial u}{\partial x}\right)=f(x)\\ 0<x<1, u(0)=u(1)=0$$
I'm discretizing this PDE using FVM as follows:
$0=x_0=x_{1/2}<x_1<x_{...
0
votes
0
answers
54
views
Existence and uniquness of solution of FVM for Poisson equation
I'm discretizing the following Poisson equation using FVM where the domain $\Omega$ of the solution is a regular hexagon of side $1$ centered about the origin.
$$\Delta u =k,\text{ $k$ constant}\\
\...
0
votes
1
answer
287
views
Elliptic PDE finite volume method with Dirichlet boundary condition
I want to discretize the following equation using a Finite Volume Method
$$\nabla \cdot (a(x)\nabla u)=f(x)\\x\in \Omega \subset \mathbb{R}^2
\\u_{|\partial\Omega}=g$$
I'm using Voronoi cells here: ...
3
votes
2
answers
210
views
Finite volume discretization of non-conservative linear hyperbolic equation
Problem. Consider the one-dimensional adjoint Euler equations for $(x,t) \in \Omega \times [0,T]$ with $\Omega \subset \mathbb{R}$ and $T > 0$
$$ \varphi_t + \Big(\frac{\mathrm{d}F}{\mathrm{d} U}(x)...
1
vote
0
answers
124
views
PDE discretization on triangular domain
Given the 2D Poisson equation
$$\Delta u = f\\ u(x,0) = g_1(x), 0<x<1\\u(0,y) = g_2(y), 0<y<1\\
\partial_n u (x, 1-x) =0, 0<x<1$$
defined on the domain $\Omega := \{(x,y) \in \...
0
votes
1
answer
1k
views
Discretization Neumann boundary condition
I'm currently working with the following Poisson equation with mixed boundary conditions, including a Neumann boundary condition.
$$\Delta u = f\\ u(x,0) = g_1(x), 0<x<1\\u(0,y) = g_2(y), 0<...
0
votes
1
answer
97
views
Changing the domain of a 3D Finite Difference code from cube to sphere
I have an explicit FD (Finite Difference) code for diffusion/heat on a PDE in a cuboid domain, and it works fine. I would like to update the discretized equations and change the code so as to solve ...
4
votes
1
answer
177
views
Matrix Representation of a Discretization for a Partial Differential Equation
I want to discretize the following problem
\begin{cases}
\mu \nabla^2u+(\lambda+\mu)\nabla \nabla\cdot u = \rho \frac{\partial^2u }{\partial t^2 } + \beta \frac{\partial u}{\partial t}\\
u(...