
[Sponsors] 
April 24, 2020, 12:28 

#21 
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52 
Thanks for getting back to me.
To answer this question in general:
However, for interFoam we see the units of the field p_rgh to be equal to [1 1 2 0 0 0 0] which is Pa. Nevertheless, the values do not matter here. One can set a fixed value of 0 Pa somewhere or 1000 Pa (which is not physically possible). It is always a matter of interest if we need real pressure or only gradients. For the compressible solvers we solve a gas equation that requires the real pressure values; that is the most important reason behind that. So I agree, for interFoam we do have the pressure units to be Pa but the values don´t matter  similar to the singlephase incompressible solvers. We all know that we could include the density in all incompressible solvers of OpenFOAM but this would just be a multiplication with a constant during the calculation which would just be wasted computational power. Tobi
__________________
Keep foaming, Tobias Holzmann 

April 24, 2020, 12:43 

#22 
Member
Gui Miotto
Join Date: Feb 2020
Posts: 30
Rep Power: 6 
Right. But one has just be careful to interpret you when you say that the values don't matter.
For instance, it is true that for incompressible solvers (all of them) summing a constant to all pressure values won't make a difference. Nevertheless, multiplying all pressures by a constant (like dividing by some density) will alter the solution. Because it affects the gradients. Correct? 

October 29, 2020, 02:41 
pressure bondary condition in sprayFoam

#23 
Member
Riddhideep Biswas
Join Date: May 2020
Posts: 30
Rep Power: 6 
Hello everyone. I am simulating a case in sprayFoam where I want to keep the atmospheric pressure boundary condition at my outlet. Which pressure value should I give?
0 Pa(i.e. the gauge pressure) or 1e5(i.e. the absolute pressure) ? It will be very helpful if any one guides me through this as I am new to sprayFoam and do not understanding this solver well. 

October 29, 2020, 10:44 

#24 
Senior Member
Santiago Lopez Castano
Join Date: Nov 2012
Posts: 354
Rep Power: 16 
Why you say it affects the gradients? The gradient operator is Reynolds Operator: you can factor out the constant.


October 31, 2020, 17:14 

#25  
Senior Member
Join Date: Apr 2020
Location: UK
Posts: 736
Rep Power: 14 
Quote:
You are correct that a factor on the pressure gradient will change the solution. However, that's not the case for the incompressible solvers  for these, where density is constant, it is possible to divide through ALL of the terms in the momentum equation by density .. having done that you are left with kinematic terms throughout ... INCLUDING pressure which now has units of m2/s2. The incompressible solvers are therefore written in terms of the kinematic variables (eg nut not mut, p/rho not p etc.), and where code is shared with the compressible solvers rho=1. 

April 5, 2021, 10:26 
Pressure Driven flow with icoFoam (DNS)

#26  
New Member
Nidal
Join Date: Nov 2018
Posts: 17
Rep Power: 8 
Hi Tobi,
Thanks for this post. I have been trying to run a case similar to what you have described here but I always find my pressure diverging as my Pressure and velocity converge (As seen in the image attached). As for my code it is as follows: U Code:
/** C++ **\ =========  \\ / F ield  OpenFOAM: The Open Source CFD Toolbox \\ / O peration  Website: https://openfoam.org \\ / A nd  Version: 7 \\/ M anipulation  \**/ FoamFile { version 2.0; format ascii; class volVectorField; object U; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 1 1 0 0 0 0]; internalField uniform (0 0 0); boundaryField { ymin { type cyclic; } ymax { type cyclic; } xmin { type pressureInletVelocity; value uniform (0 0 0); } xmax { type zeroGradient; } zmin { type cyclic; } zmax { type cyclic; } ASCII { type noSlip; } } // ************************************************************************* // Code:
/** C++ **\ =========  \\ / F ield  OpenFOAM: The Open Source CFD Toolbox \\ / O peration  Website: https://openfoam.org \\ / A nd  Version: 7 \\/ M anipulation  \**/ FoamFile { version 2.0; format ascii; class volScalarField; object p; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 2 2 0 0 0 0]; internalField uniform 0; boundaryField { ymin { type cyclic; } ymax { type cyclic; } xmin { type totalPressure; p0 uniform 2; value uniform 2; } xmax { type totalPressure; p0 uniform 0; value uniform 0; } zmin { type cyclic; } zmax { type cyclic; } ASCII { type zeroGradient; } } // ************************************************************************* // Quote:
Last edited by Nidalsb; April 5, 2021 at 18:54. 

March 18, 2024, 05:49 

#27  
Member
Pedro Gouveia
Join Date: Oct 2022
Location: Portugal
Posts: 64
Rep Power: 4 
Quote:
Probably too late for you. But for anyone that comes read this thread. I believe you should not impose totalPressure BC at inlet and outlet. As already mentioned before, the best would be to implement a totalPressure boundary condition at the inlet, and a fixedValue or pressure BC at the outlet. 

March 18, 2024, 21:25 

#28 
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52 
Actually, it does not matter.
The total pressure acts as fixed value for outflow and as total pressure fir inflow. Thus, for most cases it should not matter to use twice total pressure or total pressure at the inlet and fixed at the outlet. However, I would also prefer Totalpressure and fixedValue for readability and clearness.
__________________
Keep foaming, Tobias Holzmann 

Thread Tools  Search this Thread 
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Map of the OpenFOAM Forum  Understanding where to post your questions!  wyldckat  OpenFOAM  10  September 2, 2021 06:29 
question regarding LES of pipe flow  pimpleFoam  Dan1788  OpenFOAM Running, Solving & CFD  37  December 26, 2017 15:42 
interFoam (HELYXOS) pressure boundary conditions  SFr  OpenFOAM Running, Solving & CFD  8  June 23, 2016 17:36 
CFX Solver stopped with error when requested for backup during solver running  Mfaizan  CFX  40  May 13, 2016 07:50 
OpenFOAM Training, London, Chicago, Munich, SepOct 2015  cfd.direct  OpenFOAM Announcements from Other Sources  2  August 31, 2015 14:36 