Questions tagged [fluid-dynamics]
The fluid-dynamics tag has no usage guidance.
104
questions
7
votes
2
answers
357
views
Shallow-water equations on a rotating sphere by using the NDSolve method with a purpose of earthquake-generated tsunami simulation
I'm trying to numerically solve a system of Shallow Water Equations in Wolfram Mathematica 14.0.0 on the rotating sphere by using the NDSolve method with a purpose of earthquake-generated Tsunami ...
4
votes
2
answers
235
views
Speed up finite element method solver with small features
I post a question on making mesh for small features. @user21 gave a useful suggestion which resolves the small features. To improve the mesh, I have also tried to increase the resolution near the ...
1
vote
0
answers
56
views
How to constrain two PDE variables to be the same value on boundary?
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. ...
1
vote
0
answers
69
views
Why is NDSolve ignoring two PDEs out of three ones I am solving?
I am solving the following coupled system of 3 PDEs modelling a 1D membrane coupled to a 1D fluid flow field underneath.
However, on putting them into NDSolveValue (and trying with FEM), it says the &...
6
votes
1
answer
174
views
How do I couple an 1D PDE to a 2D Laplace equation?
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}=-\...
4
votes
2
answers
202
views
Solve Richards equation for unsaturated soils with FEM (`NDSolveValue`)
I am attempting to solve the nonlinear Richards equation for the dependent variable $\Psi(t,x,y)$. The equation is as follows:
$\frac{\partial\theta(\Psi)}{\partial t}=\nabla. (k(\Psi)\nabla(\Psi + y) ...
6
votes
1
answer
170
views
Avoiding artificial diffusion and minimize changes to code
I am currently working through Solving Partial Differential Equations with Finite Elements specifically the fluid flow problems. I took the Stokes flow problem and replaced it with Euler's equations ...
4
votes
1
answer
180
views
Solving Integro-Differential Equation with Numerous Dependencies Using DSolveValue
I am attempting to solve equation (3.9a) from the paper "On the equation for spherical-particle motion: effect of Reynolds and acceleration numbers" to characterize the response of a ...
5
votes
1
answer
360
views
Solving third order DE from fluid dynamics
I am trying to use DSolve to solve a differential equation from G. Batchelor: An Introduction to Fluid Dynamics, eq. 5.12.4:
[...] equation now reduces to
$$\boxed{...
7
votes
2
answers
311
views
How to improve FDM solver for unsteady viscous flow?
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 ...
3
votes
4
answers
199
views
NDSolve over derivatives of Heaviside function
I am trying to numerically solve for the strain of a Maxwell material in response to a step stress. The governing equations are $$\dot{\sigma} + \sigma = \dot{\varepsilon}$$ and I want to find $\...
2
votes
0
answers
72
views
Can Mathematica's FEM solve coupled Dirichlet Boundary Conditions?
I am solving a coupled system of PDEs using Mathematica's FEM capabilities.
Specifically, the Navier-Stokes equations with a no-flux stress-free boundary.
To do this, I need to specify a Dirichlet ...
6
votes
0
answers
856
views
Code for quasi 1D nozzle flows
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}}...
2
votes
1
answer
148
views
Infinite expresssion 1/0 encountered when use NDSolve for 3D axisymmetric Navier-Stokes (Euler) equations
The PDEs we are interested in solving using NDSolve is the vorticity-stream formulation of the 3D axisymmetric Navier-Stokes (Euler) equations (Ref.1 :T. Y. Hou, Potential singularity of the 3D Euler ...
3
votes
1
answer
171
views
Invalid PeriodicBoundaryCondition for Navier Stokes problem using NDSolveValue
Background: I'm looking to have a 2D re-entrant channel of a geophysical flow that is forced by a wind stress at the surface ("taux"; below) and experiences planetary rotation ("cor&...
2
votes
1
answer
96
views
How to extract gauss coordinates in AceGen/ AceFEM?
I am trying to implement a 2D turbulence problem with the model of Spalart-Allmaras. Therefore, I need to extract the global gauss coordinates to define parameter 'd' which stands for the distance to ...
1
vote
0
answers
88
views
NDSolve stops solving past a certain time
This is a continuation of the post I've made Unable to solve Delay PDEs Error in Boussinesq Approximation. I apologise if I shouldn't have posted a seperate question for this but I think that the ...
3
votes
1
answer
230
views
Steady state fluid flow for downward flow past an obstacle
I was attempting to simulate fluid flow past a circular obstacle. The following is the code which I used
...
1
vote
0
answers
85
views
Unable to solve Delay PDEs Error in Boussinesq Approximation
I'm trying to solve the set of equations below describing the flow of a pot of water being heated slightly. The equations are 2D axisymmetric in nature.
...
5
votes
1
answer
149
views
Spalart-Allmaras turbulence model
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 ...
4
votes
1
answer
464
views
Implementation of FEM to steady-state coupled fluid flow and heat transfer
This is a steady-state conjugate heat transfer problem (the time-independent version of this problem). The problem is conjugate as the energy equation is being solved in thermally connected solid and ...
4
votes
1
answer
200
views
NDSolveValue gives up without warning or solution on PDEtoODE system
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 ...
7
votes
1
answer
372
views
Refining mesh size leads to absurd results for a coupled heat transfer FEM model
I have been recently solving a conjugate heat transfer problem, which involves fully-reversing or reciprocating flow of fluid over a heated block of solid. The problem is 2D and the temperature field ...
2
votes
1
answer
271
views
Speeding up NDSolve to reasonable speeds to solve a coupled PDE system
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}{\...
1
vote
1
answer
227
views
How to use VectorPlot3D to visualize a solution of Navier-Stokes equations in cylindrical coordinates?
I try to solve axially symmetric Navier-Stokes equations in cylindrical coordinates. I have successfuly solved the equations, but I have troubles when I try to plot the solution, as VectorPlot3D does ...
5
votes
0
answers
205
views
Resolving singularity in convection-diffusion equation using pdetoode
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.
...
2
votes
1
answer
166
views
Directly calculating the cyclic steady state of a time-periodic conjugate heat transfer problem
Context
The following transient problem is the reciprocating (i.e., fully reversing) flow of a fluid $0<x<L, 0<y<d$ over a thick heated block $0<x<L, -e<y<0$ until the system ...
3
votes
1
answer
154
views
Conjugate heat transfer modelling of reciprocating flow crashes for long flow times
The following transient problem is essentially the reciprocating (i.e., fully reversing) flow of a fluid over a thick heated block until the system reaches a cyclic steady-state (i.e., the system ...
21
votes
4
answers
1k
views
What's wrong with this FFT-based Von Kármán vortex street simulation?
About 9 years ago, I came across this interesting website, and found the following paragraph with a broken Mathematica code sample:
When fluid passes an object, it can leave a trail of vortices ...
2
votes
1
answer
123
views
Preventing Mathematica from applying product rule
I am programming viscous terms of compressible Navier-Stokes equations
...
4
votes
1
answer
173
views
NDSolve for Fluid Flow - Monitor Residuals
I'm using NDSolve for fluid flow and would like to monitor the convergence of the solution more closely. I have a simple stationary case set up. NDSolve should return the solutions for u,v and p. ...
9
votes
1
answer
573
views
Fourth order, nonlinear PDE depicting dynamics of liquid lenses
PROBLEM STATEMENT
Recently, I was trying to verify the solution of a set of thin film spreading equations given by this paper.
Where
$$p1=-(h_{1xx}+\sigma h_{2xx})$$
$$p2=-\sigma h_{2xx}-\Pi[h2-h1]$$
...
1
vote
1
answer
129
views
Transient darcy flow equation
I can solve the following stationary Darcy problem:
$div(\nabla u)=1$
with
$ u = 0 \in \Gamma_d$
...
4
votes
1
answer
358
views
Speeding up Boussinesq equations solving?
I am working on Boussinesq equation. The notebook can run perfectly for only 0.6 steps and then the calculation starts running slowly after 0.7. All boundary conditions seemed fine. I am unsure if I ...
0
votes
0
answers
93
views
Plotting contours of a two-variable function containing a sum
I'm trying to use Mathematica to plot contours of a rather intricate two-variable function. The equation describes the velocity profile for laminar flow in a tube of rectangular section, namely:
$$
{w^...
0
votes
0
answers
146
views
How to find non-trivial solution to homogeneous linear equations by Mathematica using code (Input form)?
I have many homogeneous equations to which I am interested to find the non-trivial solution using Mathematica, But I am totally new to Mathematica, so I do no know, how to find the non-trivial ...
10
votes
2
answers
872
views
Reciprocating flow in a channel over a heated surface
The following is a coupled heat transfer and fluid flow problem.
A thick plane channel is being heated with a constant flux from the bottom (at $y=-e$) with a constant heat flux $q$ as shown in the ...
21
votes
1
answer
549
views
3D stable fluids algorithm to simulate transition from laminar to turbulent flow
This algorithm is 3D extension of our 2D algorithm published on this page and here.
We suppose that with this code we can simulate transition from laminar to turbulent flow. In this example we compute ...
4
votes
1
answer
173
views
How to display warning message inside manipulate?
Using the code shown, Reynolds number is calculated for given parameters. Is it possible to display a warning message to the user if a parameter is outside applicable range? e.g., if the fluid ...
0
votes
0
answers
93
views
Can mathematica numerically solve this system of coupled integro differential equations?
Here's my system:
R(x,y,t) is the concentration of a chemical that's diffusing across the box. The disk is a mobile sink for the chemical, which absorbs it in proportion to its concentration. The ...
1
vote
0
answers
176
views
Interaction between fluid flow and elastic obstacle (fluid-structure interaction) [closed]
I would like to model the velocity and pressure distribution of an elastic obstacle in a channel where the fluid flows. There are Navier-Stokes examples in Mathematica webpage with rigid obstacles but ...
1
vote
1
answer
96
views
How to make a calculator to display the Non-Dimensional number
I am a beginner here and want to learn this tool. At first, I want to make one calculator that will display the value of the Non-Dimensional number of Fluid dynamics based on user inputs.
In this code,...
5
votes
2
answers
335
views
Modified Heat Transfer in Fluid Flow
I am trying to simulate Modified Heat Transfer in Fluid Flow (based on Buoyancy-Driven Flow in a Square Cavity ).
The modified heat transfer takes the form:
with the solid volume fraction:
The ...
18
votes
1
answer
669
views
Stable fluids code for electromagnetic mixture application
This code has been translated from the original Jos Stam code and improved with some Mathematica functions. It solves problem of viscous incompressible flow with electromagnetic force in a rectangle ...
16
votes
2
answers
1k
views
Stokes equations in 2D with traction boundary conditions
This is a follow-up to a previous question (see here). We would like to solve the two-dimensional Stokes equations using the FEM package in Mathematica, when we prescribe traction boundary conditions. ...
4
votes
1
answer
586
views
Stokes equations in 2D with Neumann conditions
I would like to solve the 2D Stokes equations within a unit disk, say $\Omega$, by using the finite element method (FEM) as it is implemented in NDSolve (by loading ...
1
vote
1
answer
71
views
How to find invariant sets of nonlinear operators below
How to find invariant sets of nonlinear operators below.
$$x[n+1]=0.9∗y[n]^2/(y[n]+2)+x[n]∗(1−0.8/(1+x[n]))$$
$$y[n+1]=0.8∗x[n]/(1+x[n])+0.6∗y[n]$$
4
votes
2
answers
341
views
2D incompressible flow solver with known non-zero initial velocity distribution
I know that there are lots of questions on this forum regarding mathematica FEM, but I haven't quite found what I am looking for. I will be working with data obtained through PIV (particle image ...
0
votes
0
answers
118
views
How to solve this linear complementarity problem with NDSolve or other functions? The arguments should be ordered consistently
I want to find a numerical solution of $\omega(t,q)$, where $t\in[0,T]$ and $q\in[0,N]$. $q_t$ is a determinstic w.r.t $t$, other unmentioned parameters can be fullfilled or given by the user.
I met ...
0
votes
0
answers
84
views
Nonlinear Differential Equation with Paramaters in Sqrt Function
For a university project, I am trying to see if my system will have choked flow and also plot the resulting pressure spike. I set up the system below to try to model the transient response.
I am able ...