Skip to main content

All Questions

Filter by
Sorted by
Tagged with
1 vote
1 answer
143 views

Derivative Approximation from Trigometric Interpolation vs Polynomial Interpolation

In the classical finite difference method one takes the derivatives of interpolating polynomials and derives the finite difference coefficients from those. The polynomial degree and consistency can be ...
lightxbulb's user avatar
  • 2,892
0 votes
0 answers
43 views

How to export a model (from e.g., Blender) to a finite difference grid?

Hoping we can get some help on this. We want to do electromagnetic simulations and need a regular finite difference mesh to do so. We want to be able to export a model (from e.g., Blender) to a finite ...
Laura Leal's user avatar
2 votes
0 answers
76 views

Ensuring stability for the explicit Runge-Kutte-Legendre method

I have successfully implemented the explicit Runge-Kutta-Legendre(RKL) method with super-time stepping to some problems in finance based on the Black-Scholes PDE. I am in the process of applying the ...
Jesper Tidblom's user avatar
0 votes
0 answers
38 views

Finite differences stability issue for PDE

Lets say I have the following centered space (x, first index) forward time (t, second index) scheme for a coupled system of partial DEs: $$u[j, k+1] = u[j, k] - \frac{\Delta t} {2 \cdot \Delta x} \...
MichaelW's user avatar
  • 151
1 vote
1 answer
70 views

Pade discretization for the first derivative

I am looking for the coefficients a,alpha,beta,gamma for highest possible order of first derivative approximation in the following scheme. $u_x$ denotes first derivative with respect to $x$ and $i$ ...
Noname's user avatar
  • 111
2 votes
1 answer
125 views

Solving advection-diffusion equation on non-rectangular domain

I am trying to solve a PDE similar to the advection-diffusion equation: $$ \frac{\partial T}{\partial t} + (\vec{u} \cdot \nabla)T = D \Delta T $$ (where $\vec{u}$ is a known advecting vector field) ...
Liris's user avatar
  • 121
0 votes
0 answers
128 views

Heat Equation for fast source with FiPy

I'm trying to solve the following differential equation with FiPy, basically laser irradiation on a surface $$ \rho_{s}C_{p,s}\frac{\partial T}{\partial t} = k_{s}\frac{\partial^{2}T}{\partial x^{2}} +...
clope99's user avatar
  • 11
0 votes
0 answers
65 views

FDTD boundary condition that replicates an infinitely thin mirror

I'm currently running a 1-D FDTD simulation where I want to model a dielectric mirror (with an anti-reflection coating on one side but let's keep it simple for now). For my purposes, the mirror can be ...
Jerry Y's user avatar
1 vote
1 answer
143 views

Navier-stokes pressure term

I am trying to solve the incompressible navier-stokes equations in 2D. As I understand it, my solution method is pretty standard, but I'll briefly describe it for completeness: Calculate $u^* = u^n + ...
Thijs Steel's user avatar
  • 1,795
0 votes
0 answers
60 views

Solve beam equation with elastic term using scipy solve_bvp

I want to solve the beam equation with distributed load and elatic term (which depends on how much the beam interact with the terrain) : $$ EI\frac{d^4w}{dx^4}+k*(w(x)-t(x))=q(x) $$ where $q(x)$ is a ...
GMV871's user avatar
  • 35
3 votes
0 answers
53 views

Datasets for inverse heat transfer problems

I was wondering if there is an available, real-life known inverse heat transfer problem dataset to benchmark oneselfs algorithm, as in MNIST for deep learning. Talking about... (well in this case I ...
Aner's user avatar
  • 191
1 vote
1 answer
256 views

Coupled Partial Differential Equations

I'm trying to solve the following system of coupled differential equations, the two-temperature model for $e$ = electrons and $l$ = lattice. $$ \rho_{e}C_{p,e}\frac{\partial T_{e}}{\partial t} = k_{e}\...
clope99's user avatar
  • 11
0 votes
0 answers
71 views

How can I get more accurate electric scalar potential in 2D closed box?

I am trying to use poisson equation to plot the electric scalar potential in close 2D space. The details in in this video and this one The following in written in Matlab for quick prototype. ...
kile's user avatar
  • 101
2 votes
1 answer
296 views

Asking advice for implementation of Conservative Finite Difference Scheme for numerically solving Gross-Pitaevskii equation

I am trying to numerically solve the Gross-Pitaevskii equation for an impurity coupled with a one-dimensional weakly-interacting bosonic bath, given by (in dimensionless units): \begin{align} i \frac{\...
sap7889's user avatar
  • 21
1 vote
0 answers
50 views

How can I apply a mixed boundary condition to a multi-material heat transfer problem using Crank-Nicolson?

I am working on a mixed material model for a melting material and need to enforce both a Dirichlet and Neumann type condition at the interface. Subject to an external surface heat flux at the top of ...
ZebraEagle's user avatar
1 vote
0 answers
44 views

Imposing higher order finite difference schemes for boundary value problems on a finite interval

I have some questions. I'm going to assume everything is in 1d with a Laplacian operator. If I discretize the Laplacian operator using $p = 2a+1$ grid points with periodic boundary conditions, I ...
Cuhrazatee's user avatar
0 votes
0 answers
38 views

Thermo Hydraulic Mechanical modeling of energy wall slab in Comsol multiphysics

I am currently working on a complex simulation project involving an energy wall slab, and I need assistance in accurately modeling and validating it using COMSOL Multiphysics. Here are the details of ...
Hizbullah's user avatar
1 vote
0 answers
70 views

Deriving order of accuracy and interpreting a given discretization scheme when underlying method ( finite difference/volume) not known

If a spatial grid is given with time levels like this: to solve the following model problem Now consider the following discretization schemes: Scheme 1 Scheme 2 Usually, to determine order of ...
me10240's user avatar
  • 445
1 vote
0 answers
104 views

Implicit-Explicit Operator Splitting Scheme

I am trying to solve the 2D advection-diffusion equation in cylindrical coordinates: $$ \frac{\partial c}{\partial t} = D\left(\frac{\partial^2 c}{\partial r^2} + \frac{1}{r}\frac{\partial c}{\partial ...
mht's user avatar
  • 11
1 vote
1 answer
290 views

Numerically solving the Advection-diffusion equation with no-flux boundary condition leads to violation of mass conservation

I am trying to solve numerically the advection-diffusion equation of the following form $$\frac{\partial C}{\partial t}=\alpha\frac{\partial^2 C}{\partial x^2}+\beta \frac{\partial C}{\partial x}$$ ...
Ornate's user avatar
  • 11
0 votes
1 answer
159 views

"Cleanest, most professional" approach to implement a finite differences scheme in dimension greater than two

Coding a finite difference algorithm in 1D does not require a complex mesh. In higher dimensions, you would need a mesh and its connectivity graph to compute the differential operators. Finite ...
mle's user avatar
  • 147
0 votes
0 answers
58 views

Vector poisson equation in cylindrical coordinates. What's wrong?

I am trying to solve this equation: $$ \frac{\partial^2 A}{\partial r^2} + \frac{1}{r}\frac{\partial A}{\partial r} - \frac{A}{r^2} + \frac{\partial^2 A}{\partial z^2} = -g $$ This is basically the ...
Physicist137's user avatar
1 vote
1 answer
173 views

Can domain decomposition methods also be applied to linear systems resulting from finite difference discretizations?

Question In general, do domain decomposition methods (DDMs) require a linear system of equations $Au = f$ to be formed by finite element discretization/method (FEM) of a PDE? Or could one simply use a ...
Jared Frazier's user avatar
2 votes
1 answer
118 views

Are there necessary conditions for SOR algorithm to converge when used for 2D discrete Poisson problem, with PBC, besides solvability condition?

I am trying to solve a 2D poisson problem that is supposed to represent diffusion of chemicals on a grid: $\nabla^2 R_{ij}=f_{ij}$. I am discretizing the problem with the standard central ...
Federica Sibilla's user avatar
0 votes
1 answer
61 views

numerical schemes for 1D PDE: for smaller grid size there is an increased roundoff error, larger size more truncation, so sweet spot in between?

I had a discussion with a colleague today. He claimed that usually for a general numerical scheme for solving a general 1D PDE, for smaller grid size there is an increased roundoff error because of ...
Millemila's user avatar
  • 445
2 votes
1 answer
194 views

How to quantify the numerical diffusion term in a second-order upwind advection scheme?

In the first-order upwind scheme, numerical diffusion can be quantified as: $$\frac{dT}{dt} = -w\left(\frac{dT}{dz}\right) + \left(\frac{wdz}{2}\right)\left(\frac{d^2T}{dz^2}\right)$$ For Lax-Wendroff,...
Yoni Verhaegen's user avatar
1 vote
2 answers
121 views

How to handle non bilinear weak form?

I solved the 2D heat equation using the finite element method. It all went well first with the adiabatic case, however problems occured when I introduced cooling with the enviroment. I modeled the ...
Boiler4562's user avatar
3 votes
1 answer
288 views

Why does the FDM give a correct solution to a PDE with a discontinuous initial condition?

I was solving the dimensionless wave equation: $$ u_{xx} = u_{tt} \tag 1$$ with the initial conditions: $$ u(x,0) = 0 \tag 2 $$ $$ u_t(x=0,0) = v_0 \tag 2 $$ $$ u_t(x>0,0) = 0 \tag 3 $$ and the ...
FriendlyNeighborhoodEngineer's user avatar
1 vote
1 answer
77 views

How to calculate the force of solid applied by fluid? Using finite difference method, DNS, staggered grid, SIMPLE algorithm, immersive boundary

Problem I am using finite difference method to solve classic problem of flow around cylinder, for validation of my group's immersive boundary method. The common way to validate numerical method is ...
CheapMeow's user avatar
2 votes
0 answers
150 views

Finite difference scheme to 1D wave equation with Dirac Delta forcing term

I am trying to simulate the following 1-dimensional wave equation with trivial initial conditions and a inhomogeneous Dirac delta function: $u_{tt} - c^2 u_{xx} = \delta(x - x')\delta(t - t'), \ u(0, ...
Rishi's user avatar
  • 121
3 votes
0 answers
88 views

finite difference method not working when going to two dimensions

I have two coupled ordinary differential equations in the steady state: The following code solves, using the Jacobi finite difference method, in 1d using Dirichlet boundary conditions for function $...
BeauGeste's user avatar
  • 131
1 vote
0 answers
140 views

How to implement boundary conditions for the Thomas algorithm

For my variable $U(t,x)$, I have implemented the thomas algorithm with $U_j^i$: $$ a(x)U_{j-1}^{i+1}+ b(x)U_j^{i+1} + c(x)U_{j+1}^{i+1} = d(x)U_j^{i} $$ Then $\textbf{A}$ is a tridiagonal vector with ...
THATS MY QUANT MY QUANTITATIVE's user avatar
0 votes
0 answers
60 views

Prof A. Stanoyevitch's finite difference based PDE matlab code

Where can one find Prof A. Stanoyevitch's finite difference based PDE matlab code? They have a book on such a topic but can't find the accompanying code. Is it well received? It's not commonly talked ...
feynman's user avatar
  • 335
2 votes
0 answers
62 views

Upwind scheme flux conservation not satisfied in 2D

I have read that the upwind scheme is flux conservative. Then by my understanding, in the absence of sinks/sources and with absorbing boundaries, the amount of the quantity leaving through the ...
ThreeOrangeOneRed's user avatar
3 votes
1 answer
299 views

How to evaluate the points near/at the boundary when using Richardson extrapolation for improved accuracy of a derivative

If we want to improve the accuracy of our numerical estimation of a derivative, we can use Richardson extrapolation. The method is very beneficial when using a centered difference scheme and the ...
FriendlyNeighborhoodEngineer's user avatar
2 votes
1 answer
138 views

Can the Runge-Kuta algorithm help in reducing numerical dispersion and anisotropy when using the FDM to solve the 2D wave equation? [closed]

I am currently studying the effects of group velocity on the finite difference solution of the wave equation. Most of what I learned is from this source. I understand that high frequency components in ...
Amilox Lex's user avatar
1 vote
1 answer
101 views

Reference request: graph Laplacian approximation for domains/manifolds

Is there any reference on solving the heat equation on irregular geometries via creating a mesh and using the graph Laplacian instead of FEM techniques? (Convergence to real solution). That is to say, ...
Aner's user avatar
  • 191
1 vote
0 answers
103 views

Can I reduce my simulation error with a staggered grid, postprocessing and compatibility equation feedback?

What I did Using the finite difference method, I solved with a certain amount of error the following system of hyperbolic partial differential equations in cylindrical coordinates (the problem is ...
FriendlyNeighborhoodEngineer's user avatar
0 votes
0 answers
54 views

2nd-order backward difference approximation for temporal terms of Euler–Bernoulli beam

I am trying to solve the Euler–Bernoulli beam numerically in structural dynamics analysis: $$\frac{\partial^2w(x,t)}{\partial t^2}= \frac {q(x,t)}{\mu(x)}-\frac {1}{\mu(x)}\frac {\partial^2}{\partial ...
Chaozhi Qiu's user avatar
1 vote
1 answer
210 views

Best finite difference scheme in 2D for the mixed derivative

The are good methods to deduce finite difference schemes for derivatives of functions of one variable. But how to get a good one for the mixed derivative of a function of two variables $u=u(x,y)$, ...
Bogdan's user avatar
  • 113
1 vote
0 answers
126 views

How to vectorise numerical differentiation

I have a 2-D matrix with 2 spatial coordinates and I want to be able to vectorise the process of numerically differentiating with respect to its 2 coordinates, rather than just looping along the rows ...
THATS MY QUANT MY QUANTITATIVE's user avatar
0 votes
2 answers
2k views

When can I use finite differences for differentiation?

Finite differences are usually used to integrate ODE's and PDE's. However, sometimes they can be used for differentiation which I illustrated simply by using the Matlab code below to differentiate the ...
FriendlyNeighborhoodEngineer's user avatar
3 votes
0 answers
151 views

Population of the coefficient matrix of a linear system Ax=b stemming from the finite differences of an arbitrary geometry

I've been looking into solving a linear system $$Ax=b$$ where $A\in\mathbb{R}$ is the sparse coefficient matrix of size $K\times K$, $b\in\mathbb{R}$ is the right-hand side (i.e., the source term) of ...
Akhaim's user avatar
  • 83
2 votes
1 answer
104 views

Creating nonuniform grids for FDM with multiple points of concentration

If I am creating a grid in the $S_i$ direction with $N_S+1$ grid points. If I want more steps around some $K$, I can use: $$ S_i=K+c \sinh \left(\xi_i\right), \quad i=0,1, \ldots, N_S $$ where $c=\...
THATS MY QUANT MY QUANTITATIVE's user avatar
2 votes
0 answers
135 views

Numerical solution for inviscid Burgers' equation seems to have no breaking time?

So I'm trying to use the Lax-Friedrichs method to solve the inviscid burgers' equation with initial condition $$u(x,0) = \sin(x)$$, using $$u_m^{n+1} = \frac{1}{2}(u_{m+1}^n + u_{m-1}^n) - \frac{\...
Applesauce44's user avatar
0 votes
1 answer
91 views

My toy Laplace equation solver using finite-difference is unstable and I'm not sure why

I am trying to solve the variable-coefficient Laplace equation $$\partial(\epsilon\partial u) = (\partial\epsilon)(\partial u) + \epsilon\partial^2 u = 0$$using a finite difference scheme: $$\left(\...
DJames's user avatar
  • 417
0 votes
0 answers
129 views

Solving a steady-state PDE

I'm working on trying to solve a steady state PDE in python and I am quite new to python and I am slightly confused on the implementation details. I have an example implementation of solving a non-...
blov's user avatar
  • 43
4 votes
1 answer
161 views

Burger's equation (PDE) does not work with downwind difference?

I'm working on implementing the discretised Burger's equation. I am quite confused as to why it does not work when using a step-function and downwind difference formula. When using a step-function and ...
blov's user avatar
  • 43
1 vote
1 answer
218 views

Finite Difference method, ADI Scheme of Douglas and Rachford

I am trying to implement the ADI scheme of Douglas and Rachford. For $p(X,Z,t)$, there is: $$ \begin{gathered} A=p^{n-1}+\Delta t_n\left[F_0\left(p^{n-1}, t_{n-1}\right)+F_1\left(p^{n-1}, t_{n-1}\...
Xerium's user avatar
  • 11
2 votes
1 answer
411 views

Where am I making a mistake in solving the heat equation using the spectral method (Chebyshev's differentiation matrix)?

I would like to numerically solve the following heat equation problem: $$ u_t = \Bigg(2{a \over l}\Bigg)^2 u_{xx} \tag 1$$ $$ x \in [ -1, 1 ] \tag 2$$ $$ u(x, 0) = 0 \tag 3$$ $$ u(1, t) = A \sin \Bigg(...
FriendlyNeighborhoodEngineer's user avatar

1
2 3 4 5
19