Skip to main content

Questions tagged [finite-difference-method]

Tag for the usage of "FiniteDifference" Method embedded in NDSolve and implementation of finite difference method (fdm) in mathematica.

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

Here we give three tests for the problem of natural convection of air in a rectangular cavity with a Rayleigh number of $Ra=10^4$ and with the time-fractional derivative $\partial_t^{\alpha}$ in the ...
Alex Trounev's user avatar
  • 52.2k
2 votes
1 answer
224 views

Below is my Mathematica code to generate the bifurcation diagram of the sine map x_n+1 = rsin(Pix_n) or in this form f(x) = rsin(Pix). (How to isolate the bifurcation points from the sine map's ...
user42700's user avatar
  • 2,027
5 votes
2 answers
770 views

I am trying to solve the following system of nonlinear PDEs in Mathematica, but I'm encountering difficulties, particularly with defining the initial conditions. Here's the system I am working with: $$...
Mikoto's user avatar
  • 366
0 votes
0 answers
70 views

Standard PDE Discretisation Schema In order to explain my question, I introduce the context below. Let $t_i \in \{t_{min}, ..., t_{max}\}$ where $\Delta t = \frac{t_{max}-t_{min}}{m}$ $y_j \in \{y_{...
G. Brickhill's user avatar
2 votes
0 answers
76 views

I want to try pdetoode for solving a heat equation with Neumman bc without using NeumannValue. I modified this code: ...
Migalobe's user avatar
  • 245
3 votes
0 answers
98 views

I'm studying PDEs that have blowup solutions, such as $$ \frac{\partial u(t,x)}{\partial t} = \Delta u(t,x) + u(t,x)^2 $$ with u=1 on the boundaries and as the initial condition at $t=0$. On a grid ...
Tom Dickens's user avatar
7 votes
3 answers
1k views

I am trying to solve Burgers' equation $$\frac{\partial u}{\partial t}+u\frac{\partial u}{\partial x}-\frac{1}{100\pi}\frac{\partial^2u}{\partial x^2}=0$$ subject to conditions $u(x,0)=-\sin(\pi x)$ ...
Naraghazi's user avatar
  • 357
1 vote
1 answer
309 views

I have solved the Swift–Hohenberg equation ...
M. A. A. Ahmed's user avatar
1 vote
1 answer
351 views

I try to solve f(x,t) numerically. Actually, this figure obtained employing pathlength continuation techniques as bundled in auto07p (or more modern pde2path) by Matlab So any help to NDSolve by ...
M. A. A. Ahmed's user avatar
2 votes
0 answers
184 views

NDSolve`FiniteDifferenceDerivative is a very helpful function to calculate numerical derivatives. It is explained in the tutorial The Numerical Method of Lines in ...
Ulrich Neumann's user avatar
6 votes
0 answers
134 views

Bathtub vortex is well known phenomena that can be simulated with numerical methods like FDM described here and FEM described in our paper here. Let consider bath with 2 inlets and one outlet in a ...
Alex Trounev's user avatar
  • 52.2k
1 vote
0 answers
206 views

I am trying to solve fourth order partial differential equation describing a fluid problem, by using Mathematica. The PDE is provided here as: $V_{\eta\eta t}=\frac{1}{H}(2\dot H V_{\eta\eta} +\eta\...
Muhammad Zeeshan khan's user avatar
8 votes
2 answers
638 views

Update I manage to find a way that resolves the problem. I'd like not to make this solution public for the moment so other answerers will have more chance to get the bounty. Here's a hint: it's a ...
xzczd's user avatar
  • 71.6k
4 votes
0 answers
244 views

For a scalar function $f$ defined on the faces of a triangulated surface $M$, and a vector field $\mathbf{F}$ on its tangent space, is there a built-in or simple way to get the derivative of $f$ in ...
Daniel Castro's user avatar
4 votes
0 answers
206 views

I'm attempting to reproduce the numerical model of the rippling instability of graphene as described in the paper "Physical Review B 101, 235428 (2020)" using Mathematica. Specifically, I'm ...
Ferca's user avatar
  • 528
2 votes
1 answer
225 views

I would like to numerically have a solution of the Gross-Pitaevskii equation for an impurity coupled with a 1D weakly interacting bosonic bath, given by: \begin{align} i\frac{\partial \phi_0(x,t)}{\...
sap7889's user avatar
  • 93
0 votes
0 answers
186 views

I have an issue when I run this code which illustrates the 2D Fisher KPP equation for boundary condition u=0 and initial condition is equal to 1 if (x,y)=(0,0) and0 otherwise , isue finite diffrence ...
RIM's user avatar
  • 65
1 vote
0 answers
103 views

I have a 4 pdes for 4 variables: v, v2, ua, and p. I would like to specify that v==v2 on the left and right boundaries at all times. Here are the equations: I discretise the system using PDEtoODE. ...
Ariana Fenris's user avatar
2 votes
1 answer
384 views

We look for $u(x, y, t)$ satisfying $$ \frac{\partial u}{\partial t}=\lambda_1 \frac{\partial^2 u}{\partial x^2}+\lambda_2 \frac{\partial^2 u}{\partial y^2}+\mu u(1-u), \quad t>0, \quad(x, y) \in \...
RIM's user avatar
  • 65
0 votes
0 answers
81 views

I am trying to solve a system of coupled PDEs. However, I have issues assigning initial and boundary values to the unknown field. I have checked and initial values satisfy the boundary conditions, and ...
questionerno8's user avatar
0 votes
1 answer
259 views

I realized that in this solution, changing one of the boundary conditions makes the answer invalid. I wonder if it is possible to modify the code in this answer to solve the following equations. $$ \...
questionerno8's user avatar
6 votes
1 answer
293 views

Recently I've come across the following system governing the spreading of an evaporating droplet. The height of the droplet $h$ is defined by the following equation $$\frac{\partial h}{\partial t}=-\...
FLP's user avatar
  • 547
3 votes
1 answer
233 views

The code given by Chris K for Lyapunov Exponent does not work and gives lot of errors for the dynamical system given in equation(2) of this paper The dynamical equations: ...
Arssat's user avatar
  • 313
4 votes
1 answer
201 views

I tried solve non-linear Functional-Fractional Differential Equation (FFDE) with this method, but it works on only for range: $x\in \{0,1\}$. I what extend the solution range for example for general ...
Mariusz Iwaniuk's user avatar
4 votes
1 answer
397 views

Background I'm going to investigate a beam-pendulum coupling system (in this question I won't consider the pendulum though), that is, a spherical pendulum is suspended on the tip of a cantilever beam. ...
rnotlnglgq's user avatar
  • 3,780
7 votes
2 answers
495 views

To solve the problem that is discussed in the paper Finite Difference Analysis of Time-Dependent Viscous Nanofluid Flow Between Parallel Plates we developed FDM solver based on the code from the blog ...
Alex Trounev's user avatar
  • 52.2k
2 votes
1 answer
194 views

I have a dissolution problem to solve with two equations (everything is in dimensionless form - concentration, time and distance - EDIT: that came from the second Fick's law, where the distance was ...
Larissa Santos's user avatar
2 votes
2 answers
319 views

I have a coupled boundary ODE with dependent variables $u=u(x)$ and $z=z(x)$, $$u'' - \frac{1}{z} \left( -3 + u'^2 (3 - c\; e^{-g u} z^4) - 6 u' z' \right) = 0\tag{1}$$ $$z'' + c\; e^{-g u} z^3 (-3 + ...
mathemania's user avatar
2 votes
0 answers
240 views

I tried to adapt a code for a single equation to solve the following system using 'pdetoode' Updated answer ...
S. Maths's user avatar
  • 203
3 votes
1 answer
341 views

I am trying to solve Richards' equation to model fluid flow in soil. The governing partial differential equation, initial condition, and boundary conditions are: The analytical solution of the problem ...
Tayfun's user avatar
  • 31
0 votes
3 answers
183 views

I have this code it runs and gives me the solution. How can I make it more compact and If I want it to extend(generalize) it to more variables how can I do it. I had asked a similar question here (...
Learner's user avatar
  • 259
5 votes
2 answers
339 views

I need to construct a replacement rule to replace (first) derivatives with centered finite differences. What I've got so far is ...
Chris K's user avatar
  • 20.6k
1 vote
1 answer
329 views

I am trying to solve the differential equation $y''(x) = y(x)+\sin[y'(x)]$ using "Fixed Point Iteration" over the interval $[0,1].$ Now using central difference method I arrived at the ...
Learner's user avatar
  • 259
6 votes
1 answer
2k views

The quasi-one-dimensional model describing the flow of compressible gas in rocket nozzles is very common. The corresponding equations have a divergent non dimensional form $ \frac{\partial \mathbf{U}}...
Alex Trounev's user avatar
  • 52.2k
3 votes
3 answers
372 views

I am working with finite difference methods analytically and I would like to be able to perform operations on subscripted variables. I would like to generate the following expression by applying a ...
Hefaestion's user avatar
0 votes
0 answers
106 views

In the "StifnessSwitching" method the default numerical scheme for the non-stiff solver is Explicit modified midpoint (Gragg smoothing) with a decreasing step size. I decided to study the ...
Van's user avatar
  • 13
1 vote
1 answer
498 views

This is a follow-up question to this previous post by @FLP, in which an interesting system of equations was solved with the useful pdetoode developed by @xzczd. I have tried to solve this problem with ...
lxy's user avatar
  • 189
5 votes
1 answer
235 views

In this post Alex gives an implementation of the Spalart-Allmaras turbulence model [1, 2]. The example produces reasonable results, as far as I can tell. However, the implementation Alex uses deviates ...
user21's user avatar
  • 42.2k
4 votes
1 answer
177 views

I am trying to solve the following one-dimensional problem: (to better understand and extend the FEM for a more complex problem), ...
a019's user avatar
  • 887
4 votes
1 answer
269 views

I have the following pair of PDEs that I want to solve in the half-space x>=0:  I followed this post to decompose the 4th-order height equation into two 2nd-order ones to respect the hyperbolic ...
Ariana Fenris's user avatar
4 votes
1 answer
430 views

This question was borne out of my attempt to answer this question. How to calculate fractional differences of a timeseries? To recreate this in Matheamatica I wrote this code ...
Daniel Berkowitz's user avatar
2 votes
1 answer
341 views

Problem Statement I am planning to solve a PDE system which consists of a fluid droplet spreading on a non-Newtonian substrate. The system consists of the following equations: $$\frac{\partial p_1}{\...
FLP's user avatar
  • 547
5 votes
0 answers
297 views

Building on the system of equations in this post, I attempted to solve an additional convection-diffusion equation describing the concentration of solute in the lens, which affects its spreading. ...
FLP's user avatar
  • 547
5 votes
1 answer
419 views

Problem Background Recently I'm attempting to replicate the result of the following research paper on the Nonlocal description of Evaporating Drops. The equation of motion of a evaporating, spreading ...
FLP's user avatar
  • 547
-1 votes
1 answer
112 views

Consider the following example. Suppose there is a thin rod which is insulated along its length. Suppose that the temperature is initially zero everywhere, and that the left end is suddenly heated and ...
MaxJ.'s user avatar
  • 25
8 votes
3 answers
1k views

As shown below, a neat explicit expression is obtained for F=2, however an exact solution is not present for 1< F < 2. How do we obtain numerical values for F = 1.5 (for instance)? There have ...
thils's user avatar
  • 3,303
2 votes
0 answers
89 views

In the tutorial for FiniteDifferenceDerivative of pseudospectral approximation, there is a nice example. I just show a snapshot The following line should define $11$ discrete wavenumbers over a ...
user95273's user avatar
  • 137
5 votes
1 answer
592 views

Recently I was attempting to solve a moving boundary fluid system on mathematica, which I have managed to convert into a coupled PDE-ODE system based on this helpful reference over here. The equations ...
FLP's user avatar
  • 547
0 votes
0 answers
84 views

I want to improve my code using the command Manipulate and being able to see the calculus of averages as the indexes l and u are moved. I did a simple example of a 4x4 matrix with the boundary ...
Franco Brondo's user avatar
3 votes
1 answer
225 views

For some differential equations, its solution may evolve to a cusp, for example, singular behavior. One may want to introduce additional mesh points near the cusp to accurately follow the solution ...
user95273's user avatar
  • 137