Solving stokes flow use pde toolbox

32 visualizzazioni (ultimi 30 giorni)
Dominique Gorissen
Dominique Gorissen il 13 Lug 2023
I would like the solve a stokes flow equation using the matlab PDE-toolbox.
and
Using an inital guess for the pressure field, the first equation can be solved using the toolbox. This will then give a solution for u that in general does not fullfill the second equation.
I would like to implement a pressure correction to update the pressure field using the second equation and then solve again until the second equation is fullfilled as well. Can someone help me out on this?
Many thanks!!
  1 Commento
Precise Simulation
Precise Simulation il 22 Feb 2024
You can possibly try to using a potential flow solution with correction for the Kutta condition as described here

Accedi per commentare.

Risposte (1)

Torsten
Torsten il 13 Lug 2023
Modificato: Torsten il 13 Lug 2023
The (simplified) Navier-Stokes equations need a special numerical treatment and cannot be solved by a general-purpose code like the PDE toolbox.
COMSOL with the fluid dynamics package and ANSYS are the commercial code options, OPENFOAM is a non-commercial alternative.
  2 Commenti
Dominique Gorissen
Dominique Gorissen il 17 Lug 2023
Modificato: Dominique Gorissen il 17 Lug 2023
Hi Toristen,
I understand you answer, however I do think there is a way to implement it. I should have explained my question more clearly. My idea for implementing is as follows:
  1. make a Pressure array of size 1xNnodes. containing a guess for the pressure in each of the nodes. (this does not have to be the correct pressure just a first guess)
  2. make a function that as input takes: (Pressure array, location.x, location.y, Mesh.nodes) and returns. This function will become the "f" coefficient
  3. apply boundary conditions and parameters a=m=d=0 and c=viscosity
  4. Solve
  5. in each node compute using the "evaluateGradients" function. This should be zero, but since the first guess for the Pressure array is probably incorrect it will not be zero in all nodes. If <0 it means mass is flowing into the node and thus the pressure should be higher there compared to neigbouring nodes. If >0 it means mass is flowing out of the node and thus pressure is to high.
  6. based on results of 4 update the values of the Pressure array and repeat until convergence.
The part that I struggle with is how to implement step 5. I need an algorithm that updates the pressure based on the current values of Pressure and
Torsten
Torsten il 17 Lug 2023
Modificato: Torsten il 17 Lug 2023
Did you read about the many existing pressure-velocity coupling schemes in the literature?
E.g. Chapter 7 of
My advice: Use an existing CFD code for your problem.

Accedi per commentare.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by