CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Calculating pressure coefficient on surface of an object in ABL simulation

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By Krao
  • 1 Post By faiazk

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 4, 2019, 00:39
Question Calculating pressure coefficient on surface of an object in ABL simulation
  #1
New Member
 
Faiaz Khaled
Join Date: Oct 2017
Location: United States of America
Posts: 17
Rep Power: 9
faiazk is on a distinguished road
Hello Everyone,

I would like to thank all the experts who leave comments and suggestions on CFD problems on this forum. I am grateful to them.

I am trying to reproduce atmospheric boundary layer flow using openfoam and to measure surface pressure coefficients on a simple building placed in the domain. I am using Komega turbulence model since this model is more useful for simple algorithm. I tried to follow the guidelines regarding yplus for Komega model.

I want to calculate the pressure coefficient on the surfaces of the building placed on the ground in the computational domain. I will briefly write out the boundary conditions below:

Code:
p
 inlet
    {
        type            zeroGradient;
    }

   outlet
    {
        type            fixedValue;
        value           uniform 0;
    }
Code:
Code:
U
outlet
    {
        type            inletOutlet;
        inletValue      uniform (0 0 0);
        value           $internalField;
    }
inlet
    {
        type            atmBoundaryLayerInletVelocity;
        #include        "include/ABLConditions"
    }
Quote:
from the
HTML Code:
https://www.cfd-online.com/Forums/openfoam-solving/190173-pressure-openfoam.html
we learn that,

"In that case, you specify p at the outlet with an value of 0. Setting an inflow using U, you might see negative pressure values at the inlet or in the whole domain."
This is the case for my simulation as well. I have negative p value throughout the domain until it reaches the outlet. Now, I am interested in calculating the surface pressure coefficient of the building inside the domain and I am aware that for incompressible flow in openFoam p means pressure/rho. I also placed probes at points of interest on the building surface so that it records the data for each iteration. Also, I placed two probes at reference height to record p close to the walls on the sides. I believe the p recorded here is also pressure/rho.

Now, my specific question is, while calculating pressure coefficient of the building surface, do I need to subtract the p recorded on the side near the wall of the domain? I am little confused on this part, as I am trying to match with experimental data. When I subtract the side p value at reference height from the building p value, there is little gap from experimental value. Otherwise, if I only use the surface recorded p (without subtracting the side p value) then I have better match with experimental data.

Just to make it clear, to obtain pressure coefficient from 'p' (obtained from probe or from paraview), should I just multiply it by 2 as my reference velocity is 1 m/s?

Cp=(p-p_ref)/(0.5*rho*U^2)

Here, U is 1 m/s. rho is already considered under 'p'.

Considering the case I described please let me know, the way I am trying to process pressure coefficient is correct or wrong? Please shed some light on how to obtain the p_ref from the domain I described.

Thanks

Regards,
Faiaz
faiazk is offline   Reply With Quote

Old   July 4, 2019, 12:14
Default
  #2
Senior Member
 
Kmeti Rao
Join Date: May 2019
Posts: 145
Rep Power: 8
Krao is on a distinguished road
Hi Faiaz,

As per my knowledge in an incompressible simulation, the pressure is defined as gradient. Therefore, the output pressure is the differential pressure and the reference pressure p_ref can be set to zero. Thus you can directly select the output value of surface pressure given by paraview. As you have already described, don't forget to multiply by density.

Krao
faiazk likes this.
Krao is offline   Reply With Quote

Old   July 5, 2019, 14:58
Default How to set or control the reference pressure
  #3
New Member
 
Faiaz Khaled
Join Date: Oct 2017
Location: United States of America
Posts: 17
Rep Power: 9
faiazk is on a distinguished road
Hello Krao,

thank you for your quick reply.

Quote:
Originally Posted by Krao View Post
Hi Faiaz,

As per my knowledge in an incompressible simulation, the pressure is defined as gradient. Therefore, the output pressure is the differential pressure and the reference pressure p_ref can be set to zero. Thus you can directly select the output value of surface pressure given by paraview. As you have already described, don't forget to multiply by density.

Krao

I have been reading on different threads regarding the topic. But, the question is how to set or control the reference pressure in OpenFOAM simple algorithm? I have 0 p-value on the outlet and also collecting values on building surface in terms of pressure/rho. So, do you think I need to subtract anything from the reading on building surface? Please let me know. If I need to subtract which value should I consider? So far, I placed two probes near the walls of the domain at roof height of the building and subtracting average of those p/rho from the readings on the building surface.

I dont know if I am confusing myself too much.

Best Regards,
Faiaz
faiazk is offline   Reply With Quote

Old   July 8, 2019, 07:44
Default
  #4
Senior Member
 
Kmeti Rao
Join Date: May 2019
Posts: 145
Rep Power: 8
Krao is on a distinguished road
Hi Faiaz,

I also use zero at the outlet for my propeller simulation. I am not sure about your problem, but in my case I select the surface pressure on the propeller for further calculations. I usually extract surface pressure directly using paraview and multiply it with density.

Regards
Krao is offline   Reply With Quote

Old   July 18, 2019, 14:54
Smile
  #5
New Member
 
Faiaz Khaled
Join Date: Oct 2017
Location: United States of America
Posts: 17
Rep Power: 9
faiazk is on a distinguished road
Quote:
Originally Posted by Krao View Post
Hi Faiaz,

I also use zero at the outlet for my propeller simulation. I am not sure about your problem, but in my case I select the surface pressure on the propeller for further calculations. I usually extract surface pressure directly using paraview and multiply it with density.

Regards


Thank you for your reply, Krao. I Really appreciate it. .. Seems like you and I are processing the pressure data in the same way..



I was wondering if somebody else has a similar experience on extracting pressure from paraview in openfoam with incompressible case. Just wanted to be sure.. if I have 0 p-value on the outlet then do I need to to subtract any value from p reading on an object placed in the computational domain.

Thanks

Regards,
Faiaz
Krao likes this.
faiazk is offline   Reply With Quote

Old   July 19, 2019, 06:18
Default
  #6
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33
hjasak will become famous soon enough
Hi,


Don't do it like that - please use the forceCoeffs function object, which will use the native data and FVM operators, (eg for the viscous stress) within FOAM.


Good luck,


Hrv
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   July 19, 2019, 13:46
Smile
  #7
New Member
 
Faiaz Khaled
Join Date: Oct 2017
Location: United States of America
Posts: 17
Rep Power: 9
faiazk is on a distinguished road
Quote:
Originally Posted by hjasak View Post
Hi,


Don't do it like that - please use the forceCoeffs function object, which will use the native data and FVM operators, (eg for the viscous stress) within FOAM.


Good luck,


Hrv
Thank you for your quick reply sir.

I read a little about the forceCoeffs function. Seems like people use it to obtain the drag, lift and moment coefficient etc. I can dive more into it to find how to obtain pressure coefficient with that. If I use this function, what is the impact of having the outlet P boundary condition to be 0.

But, my another question, was the approach mentioned in the earlier post right or wrong?

I am also using probes to collect p values for specific locations of interest. So, the p-value I am getting from the probes at the end of the converged simulation, is it the final (pressure/rho) value to calculate the pressure coefficient or I need to add/subtract something from that p value?


Probably, a more generic question would be if I have a p-value of 0 at the outlet, then can I consider my reference pressure to be zero and process any pressure in the domain without adding or subtracting anything from it?


Thanks

Please let me know.

Regards,
Faiaz
faiazk is offline   Reply With Quote

Old   July 25, 2019, 21:07
Default
  #8
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quick answers:
Quote:
Originally Posted by faiazk View Post
I read a little about the forceCoeffs function. Seems like people use it to obtain the drag, lift and moment coefficient etc. I can dive more into it to find how to obtain pressure coefficient with that. If I use this function, what is the impact of having the outlet P boundary condition to be 0.
It's just a calculation function, as if you were calculating in ParaView, it does not affect the flow.

Quote:
Originally Posted by faiazk View Post
But, my another question, was the approach mentioned in the earlier post right or wrong?
Depends on what exactly you want o calculate. "forceCoeffs" can take into account viscous forces as well, not just the pressure on the surface.

Quote:
Originally Posted by faiazk View Post
Probably, a more generic question would be if I have a p-value of 0 at the outlet, then can I consider my reference pressure to be zero and process any pressure in the domain without adding or subtracting anything from it?
The "p" field in simpleFoam is representative of it being in reference to a reference pressure. That way you can take the "p" field, multiply by the air density and add 1 atmosphere for air pressure at sea level to the whole field, to get the total pressure...
... although it's still without the hydrostatic pressure, but you could calculate that field too and add it to the expression, to get the total pressure.
__________________
wyldckat is offline   Reply With Quote

Reply


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 Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Simulation of a single bubble with a VOF-method Suzzn CFX 21 January 29, 2018 01:58
simpleFoam - pressure (coefficient) of head shape GJM1991 OpenFOAM Running, Solving & CFD 4 May 12, 2015 18:15
How ot plot pressure over an object surface? vilius STAR-CCM+ 2 March 25, 2015 16:50
Calculating the force exerted on an object from fluid pressure amrbekhit CFX 1 January 30, 2011 17:38
Hydrostatic pressure in 2-phase flow modeling (long) DS & HB Main CFD Forum 0 January 8, 2000 16:00


All times are GMT -4. The time now is 01:12.