|
[Sponsors] |
forces functionObject with interFoam and dynamic pressure |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
October 26, 2018, 06:43 |
forces functionObject with interFoam and dynamic pressure
|
#1 |
Member
Anna Feichtner
Join Date: Dec 2016
Location: Cornwall (UK)
Posts: 36
Rep Power: 9 |
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 |
|
October 29, 2018, 06:32 |
|
#2 |
Member
Anna Feichtner
Join Date: Dec 2016
Location: Cornwall (UK)
Posts: 36
Rep Power: 9 |
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 } 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. I would appreciate any ideas I keep feeling that these are stupid newbie-questions... Best wishes, Anna |
|
June 19, 2019, 21:24 |
|
#3 |
Member
Anna Feichtner
Join Date: Dec 2016
Location: Cornwall (UK)
Posts: 36
Rep Power: 9 |
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 } Code:
interFoam -postProcess -fields "(p U)" -func totalPressureCompressible 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 } |
|
June 20, 2019, 12:15 |
|
#4 |
Member
Hector
Join Date: Jul 2010
Location: Barcelona
Posts: 30
Rep Power: 16 |
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.
|
|
June 20, 2019, 21:46 |
|
#5 |
Member
Anna Feichtner
Join Date: Dec 2016
Location: Cornwall (UK)
Posts: 36
Rep Power: 9 |
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 |
|
|
|
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 |