
[Sponsors] 
Implement simple barotropic relation  derive density field from pressure field 

LinkBack  Thread Tools  Display Modes 
May 27, 2015, 03:49 
Implement simple barotropic relation  derive density field from pressure field

#1 
New Member
GertJan Meijn
Join Date: Apr 2015
Posts: 8
Rep Power: 3 
Dear all,
For my thesis I want to research cavitation by using barotropic relations (like Delannoy & Kueny in 1990). This has the advantage that I don't necessarily need a complex multiphase solver, but can use a simple compressible solver combined with a barotropic relation to solve the problem. To be more specfic, I want to use a hyperbolic tangent to model the transition from liquid density to vapor density and this function is completely depending on the pressure. I am looking for a quick and dirty way to implement this barotropic equation into a compressible solver. Meaning that I would like to update my density simply by relating it to a curve that gives density as a function of pressure, if you know the pressure field, the density should follow directly. To my understanding most OpenFOAMsolvers get the density field by evaluating the pressurefield, and after this, perform a density update by calling 'thermo.rho()'. Thus far I've been looking at compressible solvers like rhoCentralFoam or rhoSimpleFoam but they all go back to the thermophysical part and perform some kind of method like 'thermo.correct()' to update the density and other properties. I find the thermophysical part of OpenFOAM extremely difficult to comprehend, so I am wondering if there is an easier way to relate the density to the pressurefield, a simple function that takes the pressurefield and directly manipulates it into the densityfield without intervention of the thermophysical modules, can anything go wrong with that? Or am I stuck with the thermophysical module and need to insert a new 'equation of state' into the existing files, but where do I start with that? Can anybody help me or send me an example to look at? You would make my day! 

March 4, 2016, 11:06 

#2 
Senior Member
Sandy Lee
Join Date: Mar 2009
Posts: 213
Rep Power: 10 
I also have the same question. Why there is no a cavitation model by using barotropic relations (like Delannoy & Kueny in 1998) in OF? I also want to inplement Delannoy's relations into interPhaseChangeFoam solver instead of alpha equation, however, I am failed. Who can help?
 Dear all, In the interPhaseChangeFoam solver, there are some cavitation models by using tranport equation, such as kunz's model, merkly's model. However, I want to implement a cavitation model by using barotropic relations, namley Delannon & Kueny's model (1998), into interPhaseChangeFoam solver instead of alpha equation, but I could not get the correct results. I would like to know, who also try it? Please help. Sandy Last edited by wyldckat; March 13, 2016 at 17:18. Reason: merged similar posts 

March 8, 2016, 22:16 

#3 
Senior Member
Sandy Lee
Join Date: Mar 2009
Posts: 213
Rep Power: 10 
Code:
while (pimple.correctNonOrthogonal()) { fvScalarMatrix p_rghEqn ( fvm::ddt(psi, p_rgh) + fvc::div(phiHbyA)  fvm::laplacian(rhorAUf, p_rgh) ); p_rghEqn.setReference(pRefCell, pRefValue); p_rghEqn.solve(mesh.solver(p_rgh.select(pimple.finalInnerIter()))); p_rgh.correctBoundaryConditions(); if (pimple.finalNonOrthogonalIter()) { phi = (phiHbyA + p_rghEqn.flux())/rhof; p_rgh.relax(); U = HbyA + rAU*fvc::reconstruct((phig + p_rghEqn.flux())/rhorAUf); U.correctBoundaryConditions(); fvOptions.correct(U); } } Last edited by wyldckat; March 13, 2016 at 17:19. Reason: Added [CODE][/CODE] markers 

March 13, 2016, 17:26 

#4 
Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 9,644
Blog Entries: 39
Rep Power: 99 
Quick question: Doesn't cavitatingFoam do what you're asking for, namely to use barotropic compressibility?
There is a thread on this topic here: CavitatingFoam Equations Also see the OpenFOAM User Guide, section "3.7 Standard libraries". edit: And search in this page: http://www.tfd.chalmers.se/~hani/kurser/OS_CFD_2014/  for this: "Baris Bicer: Implementation of Transport Model into CavitatingFoam to simulate the Cavitation in Diesel Injector Nozzle."
__________________
Last edited by wyldckat; March 13, 2016 at 17:27. Reason: see "edit:" 

March 29, 2016, 09:20 
how to write pEqn.C

#5 
Senior Member
Sandy Lee
Join Date: Mar 2009
Posts: 213
Rep Power: 10 
Hi Bruno,
Thanks for the reply. However, I think there are many differences in the barotropic equation between cavitatingFoam and Delannoy & Kueny's . I don't know how to write a pEqn.C for Delannoy & Kueny's model as like as it in cavitatingFoam. Could you help me? Sandy 

May 3, 2016, 05:28 
Could not get correct results

#6 
Senior Member
Sandy Lee
Join Date: Mar 2009
Posts: 213
Rep Power: 10 
Hi Bruno,
I did many tries, but I still could not get convergent results. Do you know the reasons. Please help. Sandy 

May 8, 2016, 15:43 

#7  
Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 9,644
Blog Entries: 39
Rep Power: 99 
Hi Sandy,
Sorry, but unfortunately this is beyond my level of expertises and currently for these next few months I'm busy beyond my capabilities Nonetheless: Quote:
In the meantime, good luck and I hope anyone else can step in! In case you don't get an answer here on the forum, you might want to try and hire someone to assist you, either:
Bruno 

Tags 
barotropic, cavitation, compressible fluids 
Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Moving mesh  Niklas Wikstrom (Wikstrom)  OpenFOAM Running, Solving & CFD  122  June 15, 2014 06:20 
Pressure enigma.  Sara  Main CFD Forum  22  July 30, 2009 04:46 
Does star cd takes reference pressure?  monica  CDadapco  1  April 19, 2007 11:26 
Neumann pressure BC and velocity field  Antech  Main CFD Forum  0  April 25, 2006 02:15 
Using SIMPLE  david  Main CFD Forum  5  July 21, 1999 02:38 