# pressure force calculation in compressible solvers

 Register Blogs Members List Search Today's Posts Mark Forums Read

 August 26, 2015, 10:54 pressure force calculation in compressible solvers #1 New Member   Silvan Join Date: Jun 2014 Posts: 10 Rep Power: 3 Dear foamers, I wish you a sunny and happy day! :-) I am trying to understand the way OpenFOAM calculates the pressure force via the function "forces". This topic has already been enlightened partially by the following post: Pressure force calculation in incompressible solvers Unfortunately, it is only for incompressible solvers. Now, I would like to extend my understanding to compressible flows. I found the lines of code in forces.c where e.g. the pressure force is being calculated: Code: ```891 vectorField fN 892 ( 893 rho(p)*Sfb[patchI]*(p.boundaryField()[patchI] - pRef) 894 );``` This is the same formula for incompressible and compressible solvers. In the incompressible case, rho(p) is the density specified by rhoInf in the dict fvSolution. In compressible cases rho(p) is 1. This can be found in the source code. So far, everything is clear. I then tried to understand the role of pRef. I came that far (incomp+comp): if one of the BC for p are fixedValue then pRef does not come into effect. But, when I don't specify a fixedValue the solver takes the pRefValue defined in fvSolution. Please correct me, if I am wrong, so far. My questions are: 1) Why is pRef subtracted? In my understanding it would make more sense to add it to p... 2) Why is pRef in the formula used in the compressible case? Isn't p already in absolute readings? Please enlighten me. 3) How does the direction come into play (it is defined as a vectorField...)? I guess that information has to be in Sfb. Please help me to understand this. I am already looking forward to your answers. Sorry, for stealing your time on such a sunny day... :-) Thank you, Silvan

 Tags compressible, forces

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post dowlee OpenFOAM Running, Solving & CFD 6 August 27, 2015 05:26 michaelzhang FLUENT 0 February 26, 2010 09:27 CFD FLUENT 0 March 7, 2006 02:03 Tim Franke Main CFD Forum 1 March 15, 2000 00:36 DS & HB Main CFD Forum 0 January 8, 2000 16:00

All times are GMT -4. The time now is 19:14.