Regarding checkerboard pressure and momentum in two-phase-compressible

492 views
Skip to first unread message

Shyam Sunder Yadav

unread,
Aug 18, 2022, 2:49:11 PM8/18/22
to basilisk-fr
Dear All

I am trying to simulate single phase compressible flow of water in sudden expansion and contraction kind of geometries with the help of two-phase-compressible.h and all-mach.h solvers.

I modified the Mach 3 wind tunnel example from Dr. Fuster's sandbox: http://basilisk.fr/sandbox/fuster/Allmach3.0/stepAllMach.c

I am getting checkerboard pressure and momentum fields as shown in the attached screenshots. I am using the minmod2 limiter.

The files I am using are attached with this mail. I am using an older version of Basilisk, the file output_hdf.h may need to be corrected in the newer versions.

I request you kindly give me some hints on how to improve the solution.

A basic analysis of the all-mach.h header shows the following code at line 237

----------------------------------------------------------------------------------------
  /** We also compute the combined face pressure gradient and acceleration
  field *gf*. */


  face vector gf[];
  foreach_face() {
    double dp = alpha.x[]*(p[] - p[-1])/Delta;
    uf.x[] -= dt*dp;
    gf.x[] = a.x[] - dp/fm.x[];
  }

  /**
  And finally we apply the pressure gradient/acceleration term to the
  flux/momentum. We also store the centered, combined pressure
  gradient and acceleration field *g*.
*/
 
  foreach()
    foreach_dimension() {
    g.x[] = rho[]*(gf.x[] + gf.x[1])/(2.*cm[]);
    q.x[] += dt*g.x[];
  }
----------------------------------------------------------------------------------------

We are basically calculating face pressure gradient by central differencing and from that the cell centered pressure gradient by simple averaging.

This averaged pressure gradient then drives the momentum. The point to note is
that the pressure from the central most grid cell is not appearing and two independent pressure and velocity solutions may evolve.

Please point if I am wrong here.

Thank you.
Regards

--
Dr. Shyam Sunder Yadav
Assistant Professor
Mechanical Engineering
BITS Pilani
09902346342
http://www.bits-pilani.ac.in/pilani/ssyadav/Profile

The information contained in this electronic communication is intended solely for the individual(s) or entity to which it is addressed. It may contain proprietary, confidential and/or legally privileged information. Any review, retransmission, dissemination, printing, copying or other use of, or taking any action in reliance on the contents of this information by person(s) or entities other than the intended recipient is strictly prohibited and may be unlawful. If you have received this communication in error, please notify us by responding to this email or telephone and immediately and permanently delete all copies of this message and any attachments from your system(s). The contents of this message do not necessarily represent the views or policies of BITS Pilani.
all-mach.h
compile.sh
momentum2.png
expansion.c
momentum.png
output_hdf.h
pressure.png
pressure2.png
two-phase-compressible.h

Shyam Sunder Yadav

unread,
Sep 11, 2022, 12:17:27 AM9/11/22
to basilisk-fr
To all those people struggling with two-phase-compressible flow with spurious oscillations in pressure, velocity, sudden inflow from outlets
================================================================================================================

Applying wave transmissive boundary condition for pressure at the outlet improves the simulation...


That is: "Navier-Stokes Characteristic Boundary Conditions Using Ghost Cells" by Motheau et al.

Best wishes

Wenge Huang

unread,
Oct 5, 2023, 4:32:39 PM10/5/23
to basilisk-fr
Hi Dr. Shyam Sunder Yadav,
I'm now struggling with the spurious oscillation in the two-phase-compressible flow. Can you provide more details about how to apply the "wave transmissive boundary condition" in Basilisk. Thank you very much. 

Shyam Sunder Yadav

unread,
Oct 6, 2023, 1:31:32 AM10/6/23
to basilisk-fr
Dear All

I could not resolve this problem of characteristic boundary conditions. 

In the process, I compiled some information in the form of attached slides which I use for covering the topic in my CFD class.

Most of the information is directly copy-pasted from various sources. Nothing is mine. I apologize for that in advance.

I hope these will be useful.

Regards
Dr. Shyam Sunder Yadav
Associate Professor

Mechanical Engineering
BITS Pilani
09902346342
http://www.bits-pilani.ac.in/pilani/ssyadav/Profile
NSCBC.pdf
Reply all
Reply to author
Forward
0 new messages