Questions tagged [pde]

Partial differential equations (PDEs) are equations that relate the partial derivatives of a function of more than one variable. This tag is intended for questions on modeling phenomena with PDEs, solving PDEs, and other related aspects.

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

Monotonicity of Errors with Respect to Step Sizes in Numerical Methods for PDEs

Consider a non-linear partial differential equation (PDE) (e.g., Burgers' equation) that is solved numerically using a finite difference method (or a similar approach). Suppose a grid search is ...
user572780's user avatar
0 votes
1 answer
43 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
  • 435
0 votes
0 answers
56 views

What exactly is a "unit-torus"?

I've seen references to the "unit torus" in papers such as this (Start of Sec 3.3, page 5). So, what exactly is a unit torus? Is it just a square or cube in d-dimensions with periodic ...
NNN's user avatar
  • 762
1 vote
0 answers
91 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 ...
THAT'S MY QUANT MY QUANTITATIV's user avatar
0 votes
0 answers
52 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
  • 277
0 votes
1 answer
89 views

Prof Lawrence Shampine's hpde matlab code

Where can one find Prof Lawrence Shampine's hpde matlab code? Is it well received? It's not commonly talked about.
feynman's user avatar
  • 277
2 votes
0 answers
57 views

Why the following discrete inequality are equal?

When reviewing papers on the numerical solutions of Partial Differential Equations (PDEs), I observed the following equation: $$ (1-C\tau)||\theta^n||^2 \leq ||\theta^{n-1}||^2 + C\tau (h^{2r+2}), $$ ...
Owen Jun's user avatar
  • 141
1 vote
0 answers
82 views

Seeking open-source PDE Solver for inhomogeneous material properties

I'm currently in search of an open-source PDE solver (Finite Element Method is preferred) that can effectively handle the challenge of material properties coefficients associated with each element in ...
Sadjad Abedi's user avatar
2 votes
1 answer
299 views

Literature request covering Chebyshev's pseudospectral collocation method

I would like to request some literature recommendations covering Chebyshev's pseudospectral collocation method for solving space-time PDEs. It would be nice if it even contained some example problems ...
FriendlyNeighborhoodEngineer's user avatar
0 votes
0 answers
59 views

Solving AU = F using linalg.cg results in 0 iterations

I am working on solving the following PDE: $$\left(\mu_{x}\frac{\partial^{2}u}{\partial x^{2}}+\mu_{y}\frac{\partial^{2}u}{\partial y^{2}}\right)=f(x,y) \tag 1$$ Which is then discretised: $$- \mu_{x} ...
blov's user avatar
  • 43
0 votes
0 answers
97 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
136 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
120 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
4 votes
0 answers
124 views

FVM for non-regular domain with triangular mesh

Setup The 1D convection-diffusion equation is given by: \begin{equation}\tag{1} \frac{\partial u}{\partial t} + v \frac{\partial u}{\partial x} - \mu \frac{\partial^2 u}{\partial x^2} = 0, \end{...
VIVID's user avatar
  • 91
0 votes
0 answers
48 views

Is a sort of "z-drift" the result of numerical precision errors in FDM?

Upon solving the 2D wave equation with Neumann boundary conditions $u_x = u_y = 0$ on a rectangular $10 \times 10 \times 10$ grid, I noticed something odd - $u$ seemed to shift upwards with time. This ...
JS4137's user avatar
  • 133
1 vote
0 answers
44 views

Solution to the Liouville-Gibbs equation

What would be the approach to numerically solve for $\rho(x,t)$ the following equation with some initial conditions $$\frac{\partial\rho}{\partial t} +\sum_{i=1}^n\left(\frac{\partial(\rho g_i)}{\...
homocomputeris's user avatar
0 votes
1 answer
60 views

Local truncation error of given implicit 1-step scheme

I'm given the 1-step implicit scheme $$y_{n+1} = y_n + \frac{h}{6}[4f(t_n, y_n) + 2f(t_{n+1}, y_{n+1}) + hf'(t_n, y_n)],$$ where $y'(t) = f(t, y)$, and I'm seeking the scheme's local truncation error. ...
jackyooo's user avatar
0 votes
0 answers
61 views

How to set Neumann BC for coupled transport problem in weak form?

Consider $$\begin{aligned} \partial_t v + b\cdot \nabla \phi &=0 \\ \partial_t \phi + b\cdot \nabla v &= 0 \end{aligned}$$ for $v:(x,y)\mapsto \mathbb{R}$, unknown and time-dependent ($...
l'étudiant's user avatar
3 votes
1 answer
167 views

How can we calculate mixed derivatives numerically using the Chebyshev derivative matrix?

Using the Chebyshev derivative matrix $D$, we can numerically approximate the first and second derivative of a function by doing matrix multiplication: $${df(x) \over dx} = Df(x) \tag 1$$ $${d^2f(x) \...
FriendlyNeighborhoodEngineer's user avatar
1 vote
0 answers
95 views

Method of lines for a mixed PDE

I am trying to solve the following PDE using the method of lines to discretize space, and then solve it as system of ODEs at each point in space using ODE15s: subject to and initial condition $w(z,t=...
Zoe's user avatar
  • 11
1 vote
2 answers
183 views

Modeling contamination diffusion in a draining container, part 2

Part 1, but I'll repeat here. This time we'll move the top boundary. I have a container of water with initial volume $V_0$ and height $L$, open at the top which receives a constant mass flux $\phi$. A ...
HiddenBabel's user avatar
0 votes
1 answer
77 views

Determining the importance of different parameters in a simulation

Suppose that I have a function of, say, three parameters, $f(p_1,p_2,p_3)$ whose output is a field(s) (e.g. velocity field) and is dependent on some real-valued parameters (e.g. viscosity, density, ...
NNN's user avatar
  • 762
2 votes
1 answer
140 views

Modeling contamination diffusion in a draining container

I asked this on the Physics site, but it fits much better here, and I now can ask a more specific question. For the scope of the problem, I have a 250-mL bottle filled with pure water and a sampling ...
HiddenBabel's user avatar
2 votes
1 answer
97 views

Symmetrization of Laplacian Matrix Operator (finite volumes)

The aim is to construct symmetric Laplacian matrix $L$ for 2D square domain. I have the following discretization of second derivatives on non-uniform grid (will skip the steps of derivation, any ...
2Napasa's user avatar
  • 362
0 votes
1 answer
56 views

Time discretisation after splitting a 4th order equation

Suppose we have a fourth-order parabolic PDE $$\partial_t u + a(t)\Delta( \Delta u) - div( b(x,t)\nabla u) =0$$ We split the equation into two second-order equations by introducing $w = \Delta u$ thus ...
Thede's user avatar
  • 3
3 votes
2 answers
238 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
  • 297
1 vote
0 answers
207 views

Using solve_ivp for a PDE: how to handle multiple time-dependent variables?

I am trying to build a Python code that solves a set of coupled differential equations which will be spatially discretized by the method of lines advancing in time. I am planning to use ...
Ziad Nasef's user avatar
2 votes
0 answers
99 views

How can we symbolically working out $\phi^4$ theory green's function/propagator and consequences in python?

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}...
kevin Tah N.'s user avatar
0 votes
0 answers
53 views

PETSC: Solving a simpler PDE results in error while solving the original equation works in snes/tutorials/ex13.c

In snes/tutorials/ex13.c, there is a function SetupPrimalProblem(), which sets up the $f_0$ and $f_1$ in ...
durianice's user avatar
  • 101
0 votes
0 answers
75 views

How to get damping matrix for structural model in FE analysis

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....
Piotr's user avatar
  • 1
0 votes
0 answers
41 views

Verification of a Function Definition in Python

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}}...
User124356's user avatar
11 votes
1 answer
1k views

Is using iterative methods to solve a linear system always superior to inversing the matrix?

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 ...
Touko Puro's user avatar
2 votes
2 answers
1k views

Problems solving 2D heat equation using physics-informed neural networks

I am trying to solve 2D heat equation using the physics-informed neural networks approach. The training loss is decreasing, but my final network outputs make no sense. I am using Python/Pytorch. 2D ...
Abdeldjalil Latrach's user avatar
2 votes
1 answer
115 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
41 views

A question from boundedness property of LMT

I have the following PDE $$ u_t = k \Delta u + \alpha u H(u-c) $$ I am trying to show the boundedness property to apply LMT. I get confused with the estimates of third term. The space I have $$V = \{...
User124356's user avatar
3 votes
1 answer
181 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
3 votes
1 answer
182 views

Discontinuous Galerkin for transport equation with non-constant advection

This question is mainly an inquiry about the usefulness of Discontinuous Galerkin (DG) for the time-independent transport equation of the form $$\sigma u+\beta\cdot\nabla u =f,\;\;\;\text{on }\Omega\...
UserA's user avatar
  • 139
2 votes
1 answer
78 views

Differential Equation with Forced Behavior

I'm attempting to solve a strange differential equation problem. My goal is to know if there are kinds of ODE solver packages to solve this kind of problem. I'm solving a 1D Partial Differential ...
nicholaswogan's user avatar
3 votes
0 answers
149 views

Form of nonlinear diffusion equation

Consider the following nonlinear diffusion problem, $$ \frac{\partial u}{\partial t} = x^{-2}\frac{\partial}{\partial x}\left(x^2 u^4 \frac{\partial u}{\partial x}\right), \quad 0 < x < 1 $$ We ...
IPribec's user avatar
  • 607
0 votes
1 answer
149 views

How do I use pdepe for a first order parabolic PDE with only one boundary condition?

I am trying to use Matlab's pdepe.m to solve the first order parabolic PDE $$\frac{\partial u}{\partial x}+\frac{\partial u}{\partial x}=x$$ I have not had trouble coding the argument of pdepe @pdefun:...
Walden Marshall's user avatar
5 votes
2 answers
313 views

Continuous vs discontinuous space-time FEM

What are some reasons for approximating a (e.g. parabolic) PDE using the space-time method, with continuous finite elements in time, vs discontinuous finite elements in time? Are there e.g. ...
Lilla's user avatar
  • 259
1 vote
0 answers
95 views

Accuracy of the Crank-Nicolson method for non-linear, inhomogeneous heat equation

I am currently coding a solution to the following PDE: $\frac{\partial T }{\partial t} =\frac{\partial}{\partial \theta}(A(\theta ,\phi )\frac{\partial T }{\partial \theta}) +\frac{\partial }{\partial ...
mathbruh67's user avatar
0 votes
0 answers
127 views

2D wave equation is numerically unstable using Finite Difference Method

I'm working with simulating both the heat and wave equation in 2D in a Python code. When simulating the heat equation, I learned about the CFL which I used to get a numerical stable solution. I found ...
Tanamas's user avatar
  • 101
0 votes
0 answers
136 views

Solving 2D Heat Equation with Input using central finite difference method

So I have implemented central finite difference method for solving the 2D heat equation. When I leave all initial and boundary conditions as 0s, but apply an input uniform across the entire space or ...
pythonengineer's user avatar
1 vote
1 answer
100 views

Simulating First Order Hyperbolic PDE with Finite Difference Scheme

I am trying to simulate a hyperbolic PDE with some control given by the following: $$u_t(x, t) = u_x(x, t) + \theta(x) u(0, t)$$ with boundary conditions: $$u(1, t) = U(t) = \int_0^1 k(1-y) u(y, t)dy$$...
Luke Bhan's user avatar
2 votes
2 answers
243 views

Errors imposing boundary conditions weakly with DG

I am using interior penalty discontinuous Galerkin to solve a simple Laplace problem: \begin{align*} \nabla u=0 \end{align*} with prescribed 0 and 1 Dirichlet boundary conditions on opposite edges of ...
CuteCompute's user avatar
1 vote
0 answers
182 views

Solving PDE on a non-uniform grid with Crank-Nicolson scheme

I am solving a 1D diffusion-type equation with the finite-difference Crank-Nicolson (CN) scheme, and I need to densify the spatial grid around the central point. One could change the spatial variable ...
ottavio 's user avatar
0 votes
0 answers
80 views

Best approach to solve this system of equations?

I have the following 1D (in space, that is) system of equations I would like to solve: \begin{equation} \rho_{fs}\frac{\partial x_{fs}}{\partial t} = h_m\left(W_a - W_{fs}\right) - D_{eff}\left(\...
HVdB's user avatar
  • 9
2 votes
1 answer
665 views

Meaning of Degree of Freedom in FEM

Assume we want to solve the Poisson eq. with the FEM on some Domain $\Omega$, i.e. $$\begin{cases} -\Delta u = f, \; \Omega\\ u = 0, \; \partial \Omega \end{cases}$$ For the sake of the discussion let ...
itpdg's user avatar
  • 123
1 vote
0 answers
81 views

Linear PDE solution with constraints

Consider the following linear PDE: $$\nabla_q V(q) - M_d(q)M^{-1}(q)\nabla_q V_d(q) = 0,$$ where $V(q)$ and $M(q)$ are known and $M_d(q)$ is a grey box function (e.x., $M_d(q)$ is fitted using a ...
Evan's user avatar
  • 11

1
2 3 4 5
18