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

Forces on multiple patches in InterDyMFoam

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes
  • 2 Post By pechwang
  • 1 Post By pechwang

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 11, 2012, 18:51
Default Forces on multiple patches in InterDyMFoam
  #1
New Member
 
Claudio
Join Date: May 2010
Location: Boston, MA
Posts: 28
Rep Power: 16
Claudio is on a distinguished road
Hi,

I want to compute the total forces across multiple patches. I am running a rectangular sloshing tank where each of the 4 walls is its own patch (LeftWall, RightWall, TopWall, BottomWall).
I tried to use the same script in controlDict that I use when the 4 walls form one single patch, but I am not sure that I get the right results.

Here's my controlDict:
Code:
    forces
    {
        type forces;
        functionObjectLibs ("libforces.so"); //Lib to load
        patches (TopWall, BottomWall, LeftWall, RightWall); // change to your patch name
        rhoInf 1000.; //Reference density for fluid
//        rhoName rhoInf;
        rhoName rho;
        pName p;
        UName U;
        CofR (0 0 0); //Origin for moment calculations
        outputControl  outputTime;
        outputInterval 0.108;
    }
Any suggestion on what might be wrong?

Thanks.
Claudio is offline   Reply With Quote

Old   July 13, 2012, 12:13
Default THe answer
  #2
New Member
 
Claudio
Join Date: May 2010
Location: Boston, MA
Posts: 28
Rep Power: 16
Claudio is on a distinguished road
Found the answer in a pre-processing thread:

Code:
    forces     
{         type forces;
         functionObjectLibs ("libforces.so"); //Lib to load
         patches (TopWall BottomWall LeftWall RightWall); // change to your patch name
         rhoInf 1000.; //Reference density for fluid
         rhoName rho;
         pName p;
         UName U;
         CofR (0 0 0); //Origin for moment calculations
         outputControl  outputTime;
         outputInterval 0.108;     }
No commas in the list of the patches names.
Claudio is offline   Reply With Quote

Old   February 6, 2013, 18:08
Default
  #3
Member
 
Pengchuan Wang
Join Date: Nov 2012
Location: Michigan USA
Posts: 58
Rep Power: 14
pechwang is on a distinguished road
Hi Claudio,

I'm new to OpenFOAM. And my research is about flow between two plates, one is stationary and one is rotating. I want to know the torques both on the topwall and the bottomwall. However, when I added two patch names, OpenFOAM only gives me the difference between these two torques. Can you help me with this? Thank you.

Quote:
Originally Posted by Claudio View Post
Found the answer in a pre-processing thread:

Code:
    forces     
{         type forces;
         functionObjectLibs ("libforces.so"); //Lib to load
         patches (TopWall BottomWall LeftWall RightWall); // change to your patch name
         rhoInf 1000.; //Reference density for fluid
         rhoName rho;
         pName p;
         UName U;
         CofR (0 0 0); //Origin for moment calculations
         outputControl  outputTime;
         outputInterval 0.108;     }
No commas in the list of the patches names.
massive_turbulence and Bashar like this.
pechwang is offline   Reply With Quote

Old   October 19, 2016, 18:46
Default
  #4
Member
 
Bashar
Join Date: Jul 2015
Posts: 74
Rep Power: 11
Bashar is on a distinguished road
Quote:
Originally Posted by pechwang View Post
Hi Claudio,

I'm new to OpenFOAM. And my research is about flow between two plates, one is stationary and one is rotating. I want to know the torques both on the topwall and the bottomwall. However, when I added two patch names, OpenFOAM only gives me the difference between these two torques. Can you help me with this? Thank you.
Hi , did you manage to solve this isuues?
Bashar is offline   Reply With Quote

Old   October 19, 2016, 21:13
Default
  #5
Member
 
Pengchuan Wang
Join Date: Nov 2012
Location: Michigan USA
Posts: 58
Rep Power: 14
pechwang is on a distinguished road
Hi Hassan,

Yes, the right way is that you need to calculate the torque on each plate separately. So the right format should be:

functions
(
force1
{
type forces;
functionObJectLibs ("libfroces.so")
outputControl timeStep;
outputInterval 10;
patches (patch_name)
pname p;
uname U;
rhoName rhoInf;
log true;
rhoInf XXX;
CofR (0 0 0);
}
forces2
{
same information as above, the only difference should be the patch name
}
)
Bashar likes this.
pechwang is offline   Reply With Quote

Old   October 20, 2016, 13:46
Default
  #6
Member
 
Bashar
Join Date: Jul 2015
Posts: 74
Rep Power: 11
Bashar is on a distinguished road
Thanks a lot for your help
Bashar is offline   Reply With Quote

Reply

Tags
forces, interdymfoam, multiple patches


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
how to set periodic boundary conditions Ganesh FLUENT 15 November 18, 2020 07:09
Forces printout for multiple patches ozzythewise OpenFOAM Pre-Processing 3 March 7, 2012 13:59
OpenFOAM static build on Cray XT5 asaijo OpenFOAM Installation 9 April 6, 2011 13:21
controlDict 'forces' function: multiple output files? lordvon OpenFOAM 0 January 10, 2011 17:22
Forces on multiple bodies jakaranda OpenFOAM 1 March 19, 2010 02:51


All times are GMT -4. The time now is 17:57.