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

forces functionObject with interFoam and dynamic pressure

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By AnnaF

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 26, 2018, 06:43
Question forces functionObject with interFoam and dynamic pressure
  #1
Member
 
Anna Feichtner
Join Date: Dec 2016
Location: Cornwall (UK)
Posts: 36
Rep Power: 9
AnnaF is on a distinguished road
Hello everybody

I have two questions regarding the forces functionObject when using it with interFoam. Sometimes I confuse myself so I would like to clarify some things.

1. When using it with interFoam, I am using "forcesCompressible" and the input for "rho" is "rho" (and not "rhoInf"), as interFoam uses the the rho field because of being a multiphase solver - unlike other incompressible solvers, where rho is constant. Am I right with this?

2. As far as I understand, the force functionObject uses the p field, which is the static pressure, and does not include the dynamic pressure 0.5*rho*U^2 ?
So I thought I can get the total pressure, as in total(p)= p + 0.5*rho*U^2, and use it as the input field "totalp" for the forces calculation. But this doesn't work and I get the error "Could not find U, totalp".
Maybe I misunderstand something?

Would be greatful to get some help

With kind regards,
Anna
AnnaF is offline   Reply With Quote

Old   October 29, 2018, 06:32
Default
  #2
Member
 
Anna Feichtner
Join Date: Dec 2016
Location: Cornwall (UK)
Posts: 36
Rep Power: 9
AnnaF is on a distinguished road
Hi again,

so my forces file looks like:
Code:
forcesFront
{
    type            forces;
    libs            ("libforces.so");
    log             yes;
    patches         (plateFrontPatch_half0);

    enabled         true;
    writeControl    timeStep;
    writeInterval   1;

    p           total(p); //p; 
    U           U;

    rho         rhoInf;  
    rhoInf      1000;    // Fluid density -> water 1000 kg/m3

    CofR        (5 0.005 0); //centre of rotation for moment calulation
}
So i set rho as constant rhoInf (regarding question 1.), as it's an incompressible case.

If I set the pressure field to total(p) instead of p, I get this error message:
Code:
--> FOAM FATAL ERROR: 
Could not find U, total(p)
    From function void Foam::functionObjects::forces::initialise()
    in file forces/forces.C at line 197.
...still not sure, why it cannot find the calculated total(p) field.

I would appreciate any ideas I keep feeling that these are stupid newbie-questions...

Best wishes,
Anna
AnnaF is offline   Reply With Quote

Old   June 19, 2019, 21:24
Default
  #3
Member
 
Anna Feichtner
Join Date: Dec 2016
Location: Cornwall (UK)
Posts: 36
Rep Power: 9
AnnaF is on a distinguished road
To give an update on my questions:

1. I am right with this.

2.
a) To get the total(p) field I am using the already available postProcessing function now (I have not seen that before). So I include in the controlDict:

Code:
functions
{
#includeFunc totalPressureCompressible
}
and execute it with:
Code:
interFoam -postProcess -fields "(p U)" -func totalPressureCompressible
b) The forcesFunction utility still cannot find the total(p) field and I still don't know why.


c) So if I want to calculate the forces with total(p) am using "areaIntegrate" directly in a dictionary (that I include in the controlDict - functions{} again:
Code:
#includeFunc totalForce
Code:
totalForce
{
    #includeEtc "caseDicts/postProcessing/surfaceFieldValue/surfaceRegion.cfg"
    operation       areaIntegrate;
    fields          (p total(p));
    regionType  patch;
    name         patch1;

    writeControl    timeStep;
    writeInterval   1
}
ChiaraViola likes this.
AnnaF is offline   Reply With Quote

Old   June 20, 2019, 12:15
Default
  #4
Member
 
Hector
Join Date: Jul 2010
Location: Barcelona
Posts: 30
Rep Power: 16
hectorgabriel85 is on a distinguished road
No idea why you need total pressure on a surface when it is the same as static pressure since U_normal is zero on a solid boundary.
hectorgabriel85 is offline   Reply With Quote

Old   June 20, 2019, 21:46
Default
  #5
Member
 
Anna Feichtner
Join Date: Dec 2016
Location: Cornwall (UK)
Posts: 36
Rep Power: 9
AnnaF is on a distinguished road
Hi Hector

Ah I see, good question. Of course, you are right. I do have a porous zone with an internal patch and wanted to check/try something.

Anna
AnnaF 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
Lesser than reference pressure in InterFOAM smog OpenFOAM Running, Solving & CFD 0 March 9, 2017 15:58
dynamic mesh case based of an interFoam case maxonline OpenFOAM Running, Solving & CFD 3 February 21, 2016 15:13
InterFoam and dynamic Moving mesh Elham OpenFOAM Running, Solving & CFD 1 September 24, 2015 10:37
interFoam with dynamic contact angle: distorted interface michielm OpenFOAM Running, Solving & CFD 4 December 20, 2012 08:54
Theoretical background of formula for dynamic contact angle in interfoam sebastian_vogl OpenFOAM Running, Solving & CFD 3 June 22, 2009 13:25


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