CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Post-Processing

Finding the maximum pressure on a given surface

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 12, 2021, 00:00
Default Finding the maximum pressure on a given surface
  #1
New Member
 
Homer Bacanto
Join Date: Dec 2020
Posts: 13
Rep Power: 6
hmrbcnt is on a distinguished road
I'm trying to find a way where I can sample the maximum pressure on a given face of an STL I've imported.


So, say I've imported an STL in the shape of a cube within the center of my mesh, and run my simulation using a solver.



Would there be a more efficient way of taking the maximum pressure, or at least the pressure in the center of the face of each side of the cube without having to manually place the probe filters?
hmrbcnt is offline   Reply With Quote

Old   March 12, 2021, 06:42
Default
  #2
New Member
 
Simon
Join Date: Jan 2014
Location: Freiburg, Germany
Posts: 15
Rep Power: 12
Nomis is on a distinguished road
Hi Homer,



assuming that the cube stl is a boundary of your domain you can use a functionObject in your controlDict to monitor the max pressure:

Code:
functions
{
          NAME     { 
                  type            surfaceFieldValue; 
                  libs             ("libfieldFunctionObjects.so"); 
                  fields          (p); 
                  writeFields no; 
                  regionType patch; 
                  name         NAMEOFPATCH; 
                  operation    max;  // also average or weighted average are possible
                  }
  }
Hope this helps. Greeting Simon
Nomis is offline   Reply With Quote

Old   March 14, 2021, 21:52
Default
  #3
New Member
 
Homer Bacanto
Join Date: Dec 2020
Posts: 13
Rep Power: 6
hmrbcnt is on a distinguished road
Quote:
Originally Posted by Nomis View Post
Hi Homer,



assuming that the cube stl is a boundary of your domain you can use a functionObject in your controlDict to monitor the max pressure:

Code:
functions
{
          NAME     { 
                  type            surfaceFieldValue; 
                  libs             ("libfieldFunctionObjects.so"); 
                  fields          (p); 
                  writeFields no; 
                  regionType patch; 
                  name         NAMEOFPATCH; 
                  operation    max;  // also average or weighted average are possible
                  }
  }
Hope this helps. Greeting Simon

Hello, Simon. Thank you for your help! I'm trying to run my code with that openfoam function, but I get some segmentation fault errors, as well as errors about duplicate entries. Here is the segmentation fault error from my log.Solver file.


Code:
surfaceFieldValue wallsCopy write:
[2] #0  Foam::error::printStack(Foam::Ostream&) at ??:?
[2] #1  Foam::sigSegv::sigHandler(int) at ??:?
[2] #2  ? in "/lib/x86_64-linux-gnu/libc.so.6"
[2] #3  Foam::tmp<Foam::Field<double> > Foam::functionObjects::fieldValues::surfaceFieldValue::filterField<double>(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, bool) const at ??:?
[2] #4  Foam::tmp<Foam::Field<double> > Foam::functionObjects::fieldValues::surfaceFieldValue::getFieldValues<double>(Foam::word const&, bool, bool) const at ??:?
[2] #5  bool Foam::functionObjects::fieldValues::surfaceFieldValue::writeValues<double>(Foam::word const&, Foam::Field<double> const&, bool) at ??:?
[2] #6  Foam::functionObjects::fieldValues::surfaceFieldValue::write() at ??:?
[2] #7  Foam::functionObjectList::execute() at ??:?
[2] #8  Foam::Time::run() const at ??:?
[2] #9  ? in "/home/hmrbcnt/OpenFOAM/hmrbcnt-7/platforms/linux64GccDPInt32Opt/bin/blastFoam"
[2] #10  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
[2] #11  ?[hmrbcnt:09547] *** Process received signal ***
[hmrbcnt:09547] Signal: Segmentation fault (11)
[hmrbcnt:09547] Signal code:  (-6)
[hmrbcnt:09547] Failing at address: 0x3e80000254b
[hmrbcnt:09547] [ 0] /lib/x86_64-linux-gnu/libc.so.6(+0x3f040)[0x7f65655b6040]
[hmrbcnt:09547] [ 1] /lib/x86_64-linux-gnu/libc.so.6(gsignal+0xc7)[0x7f65655b5fb7]
[hmrbcnt:09547] [ 2] /lib/x86_64-linux-gnu/libc.so.6(+0x3f040)[0x7f65655b6040]
[hmrbcnt:09547] [ 3] /home/hmrbcnt/OpenFOAM/OpenFOAM-7/platforms/linux64GccDPInt32Opt/lib/libfieldFunctionObjects.so(_ZNK4Foam15functionObjects11fieldValues17surfaceFieldValue11filterFieldIdEENS_3tmpINS_5FieldIT_EEEERKNS_14GeometricFieldIS6_NS_12fvPatchFieldENS_7volMeshEEEb+0xae)[0x7f653e9f038e]
[hmrbcnt:09547] [ 4] /home/hmrbcnt/OpenFOAM/OpenFOAM-7/platforms/linux64GccDPInt32Opt/lib/libfieldFunctionObjects.so(_ZNK4Foam15functionObjects11fieldValues17surfaceFieldValue14getFieldValuesIdEENS_3tmpINS_5FieldIT_EEEERKNS_4wordEbb+0x2d2)[0x7f653ea2f912]
[hmrbcnt:09547] [ 5] /home/hmrbcnt/OpenFOAM/OpenFOAM-7/platforms/linux64GccDPInt32Opt/lib/libfieldFunctionObjects.so(_ZN4Foam15functionObjects11fieldValues17surfaceFieldValue11writeValuesIdEEbRKNS_4wordERKNS_5FieldIdEEb+0xa9)[0x7f653ea2fb19]
[hmrbcnt:09547] [ 6] /home/hmrbcnt/OpenFOAM/OpenFOAM-7/platforms/linux64GccDPInt32Opt/lib/libfieldFunctionObjects.so(_ZN4Foam15functionObjects11fieldValues17surfaceFieldValue5writeEv+0x1ae)[0x7f653e9e6ade]
[hmrbcnt:09547] [ 7]  in "/home/hmrbcnt/OpenFOAM/hmrbcnt-7/platforms/linux64GccDPInt32Opt/bin/blastFoam"
/home/hmrbcnt/OpenFOAM/OpenFOAM-7/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so(_ZN4Foam18functionObjectList7executeEv+0xe3)[0x7f6566928293]
[hmrbcnt:09547] [ 8] /home/hmrbcnt/OpenFOAM/OpenFOAM-7/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so(_ZNK4Foam4Time3runEv+0xe2)[0x7f656693bc62]
[hmrbcnt:09547] [ 9] blastFoam(+0x6612)[0x55b756606612]
[hmrbcnt:09547] [10] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7)[0x7f6565598bf7]
[hmrbcnt:09547] [11] blastFoam(+0x771a)[0x55b75660771a]
[hmrbcnt:09547] *** End of error message ***

Any idea what might be causing this? I'm using the blastFoam solver, if the solver matters. Thank you
hmrbcnt is offline   Reply With Quote

Old   March 15, 2021, 04:10
Default
  #4
New Member
 
Simon
Join Date: Jan 2014
Location: Freiburg, Germany
Posts: 15
Rep Power: 12
Nomis is on a distinguished road
I don't now if the usual functionObjects are supported by blastFoam....
Please check the large number of tutorials within blastFoam and the detailed manual.

There might be one case monitoring the pressure on a patch,
otherwise ask in the blastFoam section of cfd-online.

Greetings Simon
Nomis is offline   Reply With Quote

Old   March 17, 2021, 03:53
Default
  #5
New Member
 
Homer Bacanto
Join Date: Dec 2020
Posts: 13
Rep Power: 6
hmrbcnt is on a distinguished road
Hello, thank you once again!


Apparently, most function objects are usable in BlastFoam, but that pressure was a volFieldValue instead of a surfaceFieldValue, so I should use a volFieldValue type instead. I'll have to try this out first.





Thank you so much for your help!
hmrbcnt is offline   Reply With Quote

Reply

Tags
pressure, probing, stl


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
Pressure fields in FOAM, p field, total pressure, etc. Tobi OpenFOAM Post-Processing 9 March 25, 2022 02:33
[snappyHexMesh] Surface triangulation using snappyHexMesh shaileshbg OpenFOAM Meshing & Mesh Conversion 4 October 17, 2019 05:42
How to test maximum total pressure and maximum flowrate in centrifugal fan rj26 Main CFD Forum 0 September 19, 2019 23:11
OF-extend: area-averaged pressure drop across one patch and one user defined surface jgross OpenFOAM Post-Processing 0 February 19, 2018 15:03
Hydrostatic pressure in 2-phase flow modeling (CFX4.2) HB &DS CFX 0 January 9, 2000 14:19


All times are GMT -4. The time now is 13:41.