|
[Sponsors] |
quick way to change from incompressible to compressible? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
April 1, 2012, 15:56 |
quick way to change from incompressible to compressible?
|
#1 |
Senior Member
Mihai Pruna
Join Date: Apr 2010
Location: Boston
Posts: 195
Rep Power: 16 |
assuming I am all set up for incompressible flow using simpleFOAM, what do I need to change to perform compressible analysis on the same geometry with minimal fuss?
which tutorial should I look at? thanks!
__________________
Mihai Pruna's Bio |
|
April 1, 2012, 20:29 |
|
#2 |
Senior Member
Mihai Pruna
Join Date: Apr 2010
Location: Boston
Posts: 195
Rep Power: 16 |
I should state that I'm looking mainly at external flows right now with Aerospace applications.
__________________
Mihai Pruna's Bio |
|
April 1, 2012, 22:35 |
|
#3 |
Member
Stefano Wahono
Join Date: Aug 2010
Location: Melbourne, Australia
Posts: 42
Rep Power: 16 |
Hi Mihai,
You can use rhoSimpleFoam for the steady compressible solver, or rhoPimpleFoam for the unsteady counterpart. I assume your question was "how to restart your incompressible simulation using a compressible solver"? The problem with the above scenario is the different dimension of the phi between the incompressible and compressible cases. The incompressible solver uses a volumetric form of phi (normalised by rho), while the compressible solver uses the mass flux form for phi. What you can do is convert your incompressible phi (volumetric flux) to the compressible phi (mass flux) using the attached utility. The utility will writes out two new fields into your time directories, i.e. rhophi and rhop. You can then clone your case into a new case, and rename the rhophi to phi, and rhop to p. If you are using turbulence model, then you need to extend the attached utility to also convert the nu to mu. The method is exactly the same as the p conversion. You need to create your own Make/files and Make/options. Code:
$ cat Make/files convertPhi.C EXE = $(FOAM_USER_APPBIN)/convertPhi Code:
$ cat Make/options EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude EXE_LIBS = \ -lfiniteVolume Good Luck, Stefano
__________________
Stefano Wahono Defence Science and Technology Organisation Propulsion Systems |
|
April 4, 2012, 13:56 |
|
#4 |
Senior Member
Mihai Pruna
Join Date: Apr 2010
Location: Boston
Posts: 195
Rep Power: 16 |
thanks. I think I'll start from scratch instead.
is sonicFoam a good solver for external compressible flows? Assuming I followed the motorcycle tutorial to set up an imcompressible flow case of my own, can I reuse the mesh dicts for SHM and BM, and, from the NACA Airfoil tutorial, adapt the controldict,fvsolution and fvscheme, add the new variables in the time 0 folder with the files alphat etc, and the RAS, thermo and turb files from the constant folder?
__________________
Mihai Pruna's Bio |
|
April 4, 2012, 22:31 |
|
#5 |
Member
Stefano Wahono
Join Date: Aug 2010
Location: Melbourne, Australia
Posts: 42
Rep Power: 16 |
> is sonicFoam a good solver for external compressible flows?
Depends. If you want low subsonic then NO. If you need steady solver, then NO. If you need to solve high Mach (transonic to supersonic) and unsteady, then YES. If you need steady compressible solver (from low subsonic to transonic) then use rhoSimpleFoam. If you need unsteady solver (from low subsonic to transonic), use rhoPimpleFoam. ***remember to enable/disable the transonic setting in rhoSimpleFoam and rhoPimpleFoam. > Assuming I followed the motorcycle tutorial to set up an imcompressible > flow case of my own, can I reuse the mesh dicts for SHM and BM, and, > from the NACA Airfoil tutorial, adapt the controldict,fvsolution and > fvscheme, add the new variables in the time 0 folder with the files alphat > etc, and the RAS, thermo and turb files from the constant folder? What is SHM and BM? You can transfer mesh between cases by just copying the constant/polyMesh directory. Yes, you can adapt the controlDict, fvSolution and fvSchemes files from the tutorials. The settings in the tutorials (i.e. fvSchemes and fvSolution) are NOT optimal for complex flow and bad mesh. You need BCs in 0: U, p, T, mut, alphat, k, epsilon, or omega. Solver will calculate and write phi during runtime. You can copy RASModel, turbulenceModel and thermophysicalPorperties from the tutorial. Change them to suit what you are trying to model. Best regards, Stefano
__________________
Stefano Wahono Defence Science and Technology Organisation Propulsion Systems |
|
April 4, 2012, 22:38 |
|
#6 |
Senior Member
Mihai Pruna
Join Date: Apr 2010
Location: Boston
Posts: 195
Rep Power: 16 |
thanks Stefano. i think i will use rhoSimpleFoam.
SHM is snappyhexmesh and BM is blockmesh
__________________
Mihai Pruna's Bio |
|
October 6, 2016, 04:54 |
|
#7 | |
Member
annn
Join Date: Jun 2016
Posts: 40
Rep Power: 10 |
Quote:
|
||
September 7, 2018, 17:20 |
|
#8 |
New Member
Nilay Kulkarni
Join Date: May 2018
Posts: 24
Rep Power: 8 |
Hello,
I am using the reactingParcelFilmFoam for a simulation. Is there a way to turn off the compressibility so that I can use it for an incompressible flow? The reason being the p_rgh goes negative and the simulation crashes but the other variables are fine. Thank you |
|
January 20, 2020, 04:29 |
|
#9 | |
Member
Join Date: Dec 2018
Posts: 75
Rep Power: 7 |
Where should i define rhoRef?
Quote:
|
||
October 29, 2021, 15:54 |
|
#10 |
New Member
Dan Vidal
Join Date: Dec 2017
Posts: 7
Rep Power: 8 |
Hi hbulus,
did you find out where to define "rhoRef"? Thanks. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Incompressible Compressible coupling... | dog5011 | Main CFD Forum | 4 | June 19, 2009 04:50 |
Using compressible BCs for incompressible problems | cfd | Main CFD Forum | 1 | April 16, 2006 03:41 |
Compressible or Incompressible? | Samy | CFX | 5 | November 18, 2004 13:16 |
Compressible vs. Incompressible formulations | Fernando Velasco Hurtado | Main CFD Forum | 3 | January 7, 2000 17:51 |
Compressible vs. incompressible NS at high Temperatures | Jean Lacroix | Main CFD Forum | 1 | December 24, 1999 07:21 |