|
[Sponsors] |
March 30, 2011, 18:34 |
Wall forces in interFoam
|
#1 |
New Member
Dave West
Join Date: Mar 2011
Location: US
Posts: 12
Rep Power: 15 |
Hey all.
I'm a newcomer to openFoam, and trying to get a handle on VOF. I have been modifying the damBreak tutorial in version 1.7.0 and I would like to output the force on an obstacle. In my controlDict, I added: functions ( forces { type forces; functionObjectLibs ("libforces.so"); //Lib to load patches (block); // change to your patch name rhoName rhoInf; rhoInf 1000; //Reference density for fluid CofR (0 0 0); outputControl outputTime; //outputInterval 1; } ); Running proceeds until it tries to calculate the forces, then it errors out telling me: --> FOAM FATAL IO ERROR: keyword nu is undefined in dictionary ".../OpenFOAM/USRNAME-1.7.0/tutorials/multiphase/interFoam/laminar/damBreak/cons tant/transportProperties" But in the transportProperties file, nu is defined for both phase 1 and phase 2. Does the "force" function not work in multiphase? If not, is there an easy way to integrate the pressure over a patch? Seems it would have to be p, not p_rgh. A search showed that someone else had the same error, but they never mentioned if they got it working. Any help is greatly appreciated! |
|
March 31, 2011, 02:58 |
|
#2 |
New Member
Jordi Muela
Join Date: Mar 2011
Posts: 27
Rep Power: 16 |
Hi,
Yes, it works in multiphase. Try with: libs ("libforces.so"); //if you don't have this line yet, you should add in controldict functions { // note that i'm using { instead ( forces { type forces; functionObjectLibs ("libforces.so"); //Lib to load patches (block); // change to your patch name rhoName rhoInf; rhoInf 1000; //Reference density for fluid CofR (0 0 0); outputControl outputTime; outputInterval 1; } } //same here hope it works for you! Bye! |
|
March 31, 2011, 11:58 |
|
#3 |
New Member
Dave West
Join Date: Mar 2011
Location: US
Posts: 12
Rep Power: 15 |
Thanks for the reply. I tried changing the ( to { , but it still crashes with the same error. And nu is definitely defined for both phases in the transportproperties file, dispite what the error is telling me. Any other ideas?
|
|
April 13, 2011, 08:24 |
|
#4 |
New Member
Jordi Muela
Join Date: Mar 2011
Posts: 27
Rep Power: 16 |
hi,
if i'm not wrong, you're running your case in laminar, ¿that's true? Previously, i've worked with RAS turbulent model, but today i ran a model in laminar and obtained the same message error that you. I made some test and i found that if you write a nu definition out of the phases definition, it works. Now the trouble is know how it affects to the simulation. My simulation is running now, so when it finish maybe i could obtain some results and extract some conclusion. i hope that can be helpful to you! Jordi |
|
April 13, 2011, 15:38 |
|
#5 |
New Member
Dave West
Join Date: Mar 2011
Location: US
Posts: 12
Rep Power: 15 |
Interesting. I'll try it with turbulence and see if the error goes away.
Thanks! |
|
February 29, 2012, 10:57 |
|
#6 |
Senior Member
Andrea Ferrari
Join Date: Dec 2010
Posts: 319
Rep Power: 16 |
Hi all,
What does it mean rhoInf for multiphase cases? rho is not constant in space (and also the viscosity). Are you sure it works for multiphase simulations? Regards andrea |
|
May 15, 2012, 08:37 |
|
#7 |
New Member
Teemo
Join Date: May 2012
Posts: 28
Rep Power: 14 |
Hi all,
Have you solved this problem? I got the same question as yours but I still have no idea about how to deal with it Regards |
|
May 15, 2012, 08:47 |
|
#8 |
Senior Member
Andrea Ferrari
Join Date: Dec 2010
Posts: 319
Rep Power: 16 |
Hi,
the force calculation tool is not designed for multiphase. If you want to have it for multiphase calculation you have to change a bit how the transport properties are read or how the forces are calculated, depending on what you want. Here there's an interesting thread about that: http://www.cfd-online.com/Forums/ope...mulations.html For my application i made my own library that calculates the forces in both phases separately. But if you are interested only in the forces for one phase it should be easier. best andrea |
|
May 15, 2012, 08:59 |
|
#9 |
New Member
Jordi Muela
Join Date: Mar 2011
Posts: 27
Rep Power: 16 |
Hi,
if you are interested in laminar cases, as Andrea says, you should modify the source files related to force calculation. But if you work with turbulent cases, simply set rhoName to rho, this should work. Example for incompressible RAS model: Code:
00057 else if (obr_.foundObject<incompressible::RASModel>("RASProperties")) 00058 { 00059 const incompressible::RASModel& ras 00060 = obr_.lookupObject<incompressible::RASModel>("RASProperties"); 00061 00062 return rho()*ras.devReff(); 00063 } Code:
00122 Foam::tmp<Foam::volScalarField> Foam::forces::rho() const 00123 { 00124 if (rhoName_ == "rhoInf") 00125 { 00126 const fvMesh& mesh = refCast<const fvMesh>(obr_); 00127 00128 return tmp<volScalarField> 00129 ( 00130 new volScalarField 00131 ( 00132 IOobject 00133 ( 00134 "rho", 00135 mesh.time().timeName(), 00136 mesh 00137 ), 00138 mesh, 00139 dimensionedScalar("rho", dimDensity, rhoRef_) 00140 ) 00141 ); 00142 } 00143 else 00144 { 00145 return(obr_.lookupObject<volScalarField>(rhoName_)); 00146 } 00147 } |
|
May 15, 2012, 09:10 |
|
#10 |
New Member
Teemo
Join Date: May 2012
Posts: 28
Rep Power: 14 |
Hi andrea,
Could you teach me how did you do that "calculates the forces in both phases separately"? Regards |
|
May 15, 2012, 09:13 |
|
#11 |
Senior Member
Andrea Ferrari
Join Date: Dec 2010
Posts: 319
Rep Power: 16 |
if you write me your e-mail i can send you the files.
andrea |
|
May 31, 2012, 04:40 |
|
#12 |
Member
liping_he
Join Date: Feb 2011
Posts: 36
Rep Power: 15 |
Hi Andrea,
I created a case by combining the interDyMFoam (tutorials/multiphase/interDyMFoam/ras/damBreakWithObstacle) and pimpleDyMFoam (tutorials/incompressible/pimpleDyMFoam/propeller) to achieve the simulation of impulse turbine (multiphases flow and AMI). The screenshot of velocity field is shown in attachment containing three nozzles and a runner. And now, I want to calculate the efficiency. A great issue comes out HOW can i obtain the torque (pressure and viscocity torque ) of runner. I have no idea about this issue. Any advice will be appreciated. regards, liping |
|
August 11, 2014, 19:46 |
calculating force
|
#13 |
New Member
Ontario
Join Date: Aug 2014
Posts: 2
Rep Power: 0 |
hello every one
I am a new user of openfoam and I want to calculate the the force at some points in dambreak(at first i want to record the force without the structure). I have generated the mesh of my flume and i have set the setfields but i do not have any idea that how i can calculate the force on some points? i was wondering if you could please help me eith my problem? |
|
January 12, 2015, 16:17 |
|
#14 |
Member
Pengchuan Wang
Join Date: Nov 2012
Location: Michigan USA
Posts: 58
Rep Power: 13 |
Hi Andrea,
How are you? I'm new to OpenFOAM, can you teach me how to calculate the torque for the multiphase flow? Thank you so much. Pengchuan |
|
April 11, 2017, 11:11 |
|
#15 | |
New Member
Join Date: Mar 2017
Posts: 11
Rep Power: 9 |
Quote:
It is a quite old thread but I am new to OpenFoam. I have read your few post about this point. I also want to implement similar Force calculation for multiphase laminar case. I am more interested to calculate forces due to water on wall(any patch). Can you please teach me how to modify forces.C to get correct results. Thank you. |
||
Tags |
forces, interfoam, multiphase modelling |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Thin Wall Heat Transfer BC for rhoSimpleFoam | swahono | OpenFOAM Running, Solving & CFD | 12 | October 4, 2013 12:49 |
Patches for OpenFOAM 1.7 on MacOS X | gschaider | OpenFOAM Installation | 101 | September 21, 2011 06:37 |
Forces on corrugated wall | kjetil | OpenFOAM Post-Processing | 0 | November 1, 2010 18:16 |
Quick Question - Wall Function | D.Tandra | Main CFD Forum | 2 | March 16, 2004 05:29 |
Extapolation of forces with wall laws. | Shu-Ren Hysing | Main CFD Forum | 3 | October 14, 2002 05:46 |