Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
1answer
38 views

Numerical solution of non-linear first order partial differential equation (HJB)

I am trying to solve a simple optimal control problem using the Hamilton-Jacobi-Bellman equation, numerically in Python. This is proving to be rather difficult as I end up having to solve the ...
0
votes
1answer
40 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 ...
2
votes
0answers
49 views

Identify the components of the (weak form) PDE in structural mechanics

I am trying to identify the weak form of PDE in structural mechanics. I read a lot of papers where they are using the elliptic boundary value problem \begin{equation} \int\limits_{\Omega} \delta \...
2
votes
0answers
52 views

2d wave equation with finite differences blowing up

I am (naively) trying to solve the 2d wave equation with finite differences. But the system blows up instantly. For simplicity I set the constant $c=1$, then I am left with $$\Delta u =u_{tt}.$$ I ...
3
votes
0answers
28 views

Guide for finite-difference schemes for Hamilton-Jacobi-Bellman Equations

I need to solve a simple, low-dimensional Hamilton-Jacobi-Bellman equation. Is there a simple guide for doing this numerically using finite-difference schemes? I found a few research articles ...
-1
votes
0answers
43 views

Solving a system of ODEs and one PDE with bvp4c

knowing that bvp4c is based on Finite Differences, would it be possible to solve a system of ODEs with also a time and space dependent parameter? Thank you.
4
votes
1answer
92 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(...
-1
votes
0answers
42 views

Implementing Danckwert’s boundary condition for the PDE

This is a follow-up to my previous question posted here. I was suggested to use the pdepe function in MATLAB to solve the PDE, $ \frac{\partial C}{\partial t} = -v\...
1
vote
2answers
112 views

Method to find PDE equation coefficient satisfying mean solution?

What is the best approach to go about solving a PDE problem of the type \begin{equation} k^3\Delta u - k(\mathbf{1}\cdot\nabla u) = 0\, ,\\ u=g\; \text{on}\; \Gamma_D\, ,\\ mean(u) = u_\text{...
1
vote
2answers
128 views

Libraries to deal with unstructured grids

I am dealing with a *.cgns file. This mesh format, when saved as an unstructured grid, holds nodes coordinates, nodes connectivity per element and boundary ...
2
votes
1answer
52 views

How to simulate basic semiconductor models using the Drift-diffusion model on Python?

I'm trying to simulate basic semiconductor models for pedagogical purposes--starting from the Drift-diffusion model. Although I don't want to use an off-the-shelf semiconductor simulator--I'll be ...
1
vote
0answers
77 views

Finite differences for the one-phase Stefan problem

I am trying to code the one-phase, one-dimensional Stefan problem using finite differences in Matlab, similarly to what has already been done in Mathematica (see https://mathematica.stackexchange.com/...
2
votes
1answer
75 views

Stability Analysis

The partial differential equation, \begin{align} \dfrac{\partial f}{\partial x} + a(x)\dfrac{\partial f}{\partial y} = 0 \qquad & f(0,y) = f(L_1,y) = c_0e^{-y} \\ & f(x,0) = c_0 \;,\; f(x,L_2) ...
2
votes
0answers
64 views

Kernel independent fast multipole method for Yukawa potential [closed]

Has anybody used the KIFMM (https://web.stanford.edu/~lexing/fmm.pdf) for the Yukawa potential?
2
votes
0answers
24 views

Neumann boundary conditions in the Maccormack scheme

I am trying to solve the viscous Burger equation $$ \frac{\partial u}{\partial t} + u\frac{\partial u}{\partial x} = \mu \frac{\partial^2 u}{\partial x^2} $$ with Neumann boundary conditions. I am ...
1
vote
1answer
72 views

Multi-steps method for Navier-stokes equations with strongly nonlinear diffusion

I am trying to solve a particular form of the Euler / Navier-Stokes equations in 1D, with very strong and non-linear diffusion coefficients. My system of equations is \begin{cases} \...
1
vote
1answer
128 views

Does a generic method for solving a system of PDEs exist?

There are generic methods for solving systems of ODEs numerically. Are there generic methods for PDEs? If so, what are they? If not, why not? To elaborate... Any set of ODEs can be written in ...
4
votes
0answers
63 views

Solving a PDE implicitly by iteration in python

Connected to this question here on Computational Science, I've posted a follow-up question on how to solve a PDE using an implicit scheme like Crank-Nicholson in general in this question on SO. But I ...
-1
votes
1answer
70 views

Simulation-based Optimization vs PDE-constrained Optimization

What is the difference between Simulation-based Optimization and PDE-constrained Optimization? Would studying a text on Simulation-based optimization be sufficient to understand and apply both?
5
votes
1answer
238 views

Solving PDE implicitly or explicitly depending on stiffness

I've got a system of several PDEs for a multitude of parts which represent real hydraulic parts like pipes or thermal energy storages. Each of these parts may have an arbitrary number of nodes and/or ...
5
votes
1answer
126 views

Finite Differencing schemes for Convection-Diffusion equation

I'm using the Convection(/advection)-Diffusion(-Reaction) equation to calculate the temperature over time in different hydraulic parts like a pipe or a heat exchanger. The flow/convection is always 1D,...
1
vote
0answers
79 views

Basic approach for numerical solution of PDE

I'm looking for some guidance on how to write a program to numerically solve a PDE. As an example for comparison in 1D: $$\frac{d^2u}{dx^2} = f\;\;\;\;u(0) = 0\;\;\;\;u(1) = 0$$ We could try 6 ...
2
votes
1answer
58 views

Is there Von Neumann stability analysis for 9-point laplacian like we have for the 5-point Laplacian?

For spatial accuracy in 2-D Laplace equation, a 9-point stencil is better than a 5-point one. $$\partial_tq= r\left(\partial^2_x q + \partial^2_y q\right)$$ for FTCS (forward-time, central-space) ...
0
votes
0answers
140 views

Need an explanation of setting Boundary Condition in pdepe (PDE Solver)

I am trying to solve the Advection-Diffusion equation using pdepe (PDE solver) in Matlab. I am not clear why we are writing ...
2
votes
1answer
50 views

Oscillation term in a posteriori error estimator

Assume that in the a (residual type) posteriori error estimator of some PDE is a term of the form $h_T\|g\|_{L^2(\Omega)}$ involved where $h_T$ is the diameter of an element and $g$ is some known data ...
5
votes
0answers
47 views

Discrete sine and cosine transform for mixed derivatives

Using sine and cosine transforms to solve Poisson's equation with Dirichlet boundary conditions seem quite standard nowadays (see, e.g., here or Table 2 in this paper). In the case of Poisson's ...
0
votes
0answers
37 views

Simplest meaningful PDE/FEM calculation for mechanical stress due to heat

W have a complicated structure on which we do some FEM calculations regarding electrical potentials and heat distribution. The equations have the form $\nabla\kappa\nabla u = f + g\rvert_{N}$ where $...
1
vote
1answer
66 views

General questions regarding stability for time-integration of operator-split PDE systems

I am interested in solving ODE systems of the form \begin{align} \frac{\partial \vec{u}}{\partial t} = F(\vec{u}) \end{align} where $F$ is a nonlinear operator, $\vec{u}$ is a vector valued function ...
2
votes
1answer
91 views

Von Neumann's stability analysis on non linear and coupled equations

I'd like to know if is possible to make a Von Neumann's stability analysis on an system of coupled equations, featuring quadratics: $$\begin{aligned} \frac{\partial u_1}{\partial t}&=D_1\Delta ...
0
votes
1answer
69 views

How to simulate thermal expansion in a 2D plane using FEA?

I am trying to model 2D thermal expansion of a square area inside another square using FEATool. I have simulated plane strain by incorporating forces pointing along the $[1 \,\,\, -1]^T$ direction ...
1
vote
0answers
70 views

Finite difference methods for coupled 2nd order nonlinear pdes

I have a system of coupled nonlinear PDEs that I cannot figure out how to solve in a smart way using FDM, so I was hoping someone here might have a clue. The equations go as: \begin{align*} \frac{1}{...
0
votes
0answers
65 views

Discretize master equation

I'm trying to solve the following equation numerically using finite difference method. $\frac{\partial P}{\partial t} = -\frac{\partial}{\partial x_1}[F_1(x_1,x_2)P] - \frac{\partial}{\partial x_2}[ ...
0
votes
0answers
51 views

Why is my BTCS diffusion PDE solver matlab code not working?

I am trying to create a function that solves one BTCS step of the following PDE: $\frac{\partial q}{\partial t} = k\frac{\partial^{2}q}{\partial x^{2}}$ over a domain of: $0\leq x \leq \pi$ with ...
5
votes
2answers
125 views

Residual norm of PDE discretization: correspondence in the continuous problem?

Solving a linear PDE like $$ \Delta u = f \quad\text{on } \Omega,\\ n\cdot \nabla u = 0 \quad\text{on } \Gamma, $$ with Finite Elements usually goes like this: Create the discretization $Au=b$ via $$ ...
0
votes
1answer
55 views

Conjugate Gradient for non symmetric matrix

I have a large sparse matrix which is symmetric for the location of non zero values, but the values are different. Could I still use the CG method? I don't have much knowledge of linear algebra, the ...
3
votes
1answer
112 views

How to numerically minimize a functional?

How to numerically minimize a functional, for example, $$J[y]=\int_{x_1}^{x_2}L(x,y(x),y'(x))dx$$ An equivalent problem is to solve the Euler equation for this functional as a differential equation. ...
2
votes
1answer
81 views

Does the PDE hold at every cell in a FVM mesh?

If you solve a given PDE (Navier stoke's, Euler, heat eqn, advection eqn, etc...) using FVM, is this PDE supposed to be valid at every cell in the discretized domain, or only in the global domain as a ...
1
vote
0answers
38 views

Jacobian Elements for Coupled Drift-Diffusion System using Vertex-Centered Finite Volume

I'm trying to solve the fully coupled drift-diffusion system using Newton's Method. Although I eventually plan to potentially use a Jacobian-Free Newton-Krylov approach, this is still something that I ...
3
votes
2answers
375 views

Implementing no-flux boundary condition reaction-diffusion PDE

I'm having trouble figuring out how to implement boundary conditions for this problem: \begin{align} \frac{\partial n}{\partial t} &= D_n\nabla^2n - \nabla\cdot\left(\frac{\chi}{1+\alpha c}n\nabla ...
4
votes
2answers
168 views

treating “almost linear” nonlinear least-squares problems

As a model for a nonlinear least-squares problem with a large linear part problem, consider $$ \Delta u = 0 \quad\text{in } \Omega,\\ n\cdot\nabla u = 0 \quad \text{on } \Gamma,\\ (u(x_i) - u(y_i))^2 =...
5
votes
2answers
107 views

Numerically solving a PDE on an unit tangent bundle

Let $M$ be a manifold and $UT(M)$ its unit tangent bundle. I have a PDE which looks something like $$ \frac{\partial f}{\partial t}(x,v) = (v\cdot \nabla_x) f(x,v) + \Delta f(x,v) $$ where $x\in M$, $...
2
votes
0answers
77 views

Monotone, monotonicity preserving, LED, TVD, NVD, bounded, stable and stability preserving discretization schemes [closed]

When it comes to discretization schemes for finite volume method, the following terms can be found in literature: monotone schemes monotonicity preserving schemes local extremum diminishing schemes ...
1
vote
1answer
64 views

Physical data for heat equation

I want to implement an algorithm to solve a heat equation, i.e. \begin{align*} \partial_t u - \Delta u = f \text{ in } \Omega\times(0,T)\\ \partial_nu = 0 \text{ in } \partial\Omega \times (0,T)\\ u(0)...
0
votes
1answer
45 views

Trying to solve a wave-like equation

I'm trying to solve an equation whose solutions I know are plane waves but there are a few nuances. First, the equation is of the form $$ \partial^2_t \psi + A(r)\partial^2_r \psi +B(r) \partial_r \...
4
votes
0answers
96 views

How to account for the interface between two different phases in a discretized diffusion model?

I have tried to set up a model for the diffusion of a gas into a liquid. The two media are next to each other and the geometry is spherical because the system should simulate the diffusion out of a ...
0
votes
2answers
100 views

Second derivative in coordinate invariant form

To solve stationary, incompressible, inviscid and irrotational flow around a circular cylinder, I am using general coordinates. Since the flow is symmetrical, we only consider the upper half of the ...
1
vote
2answers
127 views

Mass conservation in 1d diffusion by method of lines

I am solving the 1D diffusion equation by discretization using the method of lines. My problem is that I don't manage to ensure mass conservation. I have read many similar questions about the topic ...
0
votes
1answer
249 views

Crank–Nicolson method for nonlinear differential equation

I want to solve the following differential equation from a paper with the boundary condition: The paper used the Crank–Nicolson method for solving it. I think I understand the method after googling ...
1
vote
2answers
123 views

Find classical solution of transport equation with FDM

We know the classical solution of transport equation is determined by one initial (boundary?) condition, for example, the solution of $$\frac{\partial u(t,x)}{\partial t}+\frac{\partial u(t,x)}{\...
0
votes
2answers
113 views

Nédélec Elements and Newton-Methods

If you want to develop numerical algorithms for variational inequalities, you often choose a Semismooth Newton Method. In many cases, this approach involves derivatives of $\max$ or $\min$ functions ...