# interFoam with centrifugal Force

 User Name Remember Me Password
 Register Blogs Members List Search Today's Posts Mark Forums Read

 LinkBack Thread Tools Search this Thread Display Modes
July 3, 2012, 10:23
interFoam with centrifugal Force
#1
New Member

Matthias P
Join Date: May 2010
Posts: 16
Rep Power: 12
Dear Foamers,i try to simulate the development of a liquid parabola in a cylinder which is filled with water by one third. The other part is captured with air. For regarding the rotation of the fluid i included the centrifugal force in the solver interFoam like it is shown below.

Quote:
 fvVectorMatrix UEqn ( fvm::ddt(rho, U) + fvm::div(rhoPhi, U) - fvm::laplacian(muEff, U) - (fvc::grad(U) & fvc::grad(muEff)) + rho*(omega_ ^ (omega_ ^ (mesh.C() + rad_) )) //- fvc::div(muEff*(fvc::interpolate(dev(fvc::grad(U)) ) & mesh.Sf())) );
For the first simulation i wanted to verify the rotational effects on the fluid. Therefore i set rad_ to zero and the angular velocity to (0 0 13.206). The gemoetry was a simple cylinder with a height of 0,5 m and a diameter of 0,15m. The liquid height is 0,2 m. After running the case and getting a constant liquid profile, i compared the solution with the analytical one and the solution calculated with fluent. While Fluent caputred the analytical solution quite well, i got an deviation of more than 2 mm in OF. So my question is where this discrepancies come from?Thx a lot!

 January 24, 2013, 06:11 #2 Member   Join Date: May 2012 Posts: 55 Rep Power: 11 Hello MatP, I think the formula in your Ueqn() is wrong. Why did you add rad_ ? How did you define rad_ and omega_? Last edited by styleworker; January 24, 2013 at 11:13.

 January 24, 2013, 12:30 #3 Member   Join Date: May 2012 Posts: 55 Rep Power: 11 Actually I just have a little difference between MRFInterFoam and interFoam including centrifugal force for steady state and moderate angular velocities. Modified UEqn: Code: ``` fvVectorMatrix UEqn ( fvm::ddt(rho, U) + fvm::div(rhoPhi, U) - fvm::laplacian(muEff, U) - (fvc::grad(U) & fvc::grad(muEff)) //+ Fcent + (rho*((2.0*M_PI/60.0*omega_vector)^((2.0*M_PI/60.0*omega_vector)^mesh.C()))) //omega_vector[1/s] in [rad/m] //- fvc::div(muEff*(fvc::interpolate(dev(fvc::grad(U))) & mesh.Sf())) );``` To define omega_vector add this part to createFields.H: Code: `dimensionedVector omega_vector(twoPhaseProperties.lookup("omega_vector"));` After compiling the solver, the magnitude and direction of the omega_vector can be set in constant/transportProperties like: Code: `omega_vector omega_vector [ 0 0 -1 0 0 0 0 ] (0 0 5);` I hope this helps

 March 30, 2013, 14:14 #4 New Member   Eric Dalmau Join Date: Mar 2013 Location: Catalonia Posts: 20 Rep Power: 9 Thanks a lot for your info styleworker, it was so helpful for my case. I had to add the centrifugal force to MRFInterFoam.

March 13, 2014, 22:39
#5
Senior Member

Huang Xianbei
Join Date: Sep 2013
Location: Yangzhou,China
Posts: 298
Rep Power: 10
Quote:
 Originally Posted by styleworker Actually I just have a little difference between MRFInterFoam and interFoam including centrifugal force for steady state and moderate angular velocities. Modified UEqn: Code: ``` fvVectorMatrix UEqn ( fvm::ddt(rho, U) + fvm::div(rhoPhi, U) - fvm::laplacian(muEff, U) - (fvc::grad(U) & fvc::grad(muEff)) //+ Fcent + (rho*((2.0*M_PI/60.0*omega_vector)^((2.0*M_PI/60.0*omega_vector)^mesh.C()))) //omega_vector[1/s] in [rad/m] //- fvc::div(muEff*(fvc::interpolate(dev(fvc::grad(U))) & mesh.Sf())) );``` To define omega_vector add this part to createFields.H: Code: `dimensionedVector omega_vector(twoPhaseProperties.lookup("omega_vector"));` After compiling the solver, the magnitude and direction of the omega_vector can be set in constant/transportProperties like: Code: `omega_vector omega_vector [ 0 0 -1 0 0 0 0 ] (0 0 5);` I hope this helps
Hi,styleworker:
I tried your method, but the code can't be successfully compiled.
Code:
`omega^(omega^mesh.C())`
the omega was defined
Code:
`omega           omega [ 0 0 -1 0 0 0 0 ] ( 0 0 0.01335 );`
Code:
```dimensionedVector omega
(
transportProperties.lookup("omega")
);```
What's missing in this code? the compile returns error 1

 March 14, 2014, 03:54 #6 Member   Join Date: May 2012 Posts: 55 Rep Power: 11 Without any error message, we can't give you an advice. If you have just inserted this peace of code in your equation, your dimensions probably don't match. The dimension of the in the UEqn should be [kg/m^2s^2], because it is a volume force [N/m^3]. Your volume force should be implemented like this: Code: ``` fvVectorMatrix UEqn ( fvm::ddt(rho, U) + fvm::div(rhoPhi, U) - fvm::laplacian(muEff, U) - (fvc::grad(U) & fvc::grad(muEff)) + (rho*(omega ^ (omega ^ mesh.C()))) //Centrifugal Acceleration );```

March 14, 2014, 07:48
#7
Senior Member

Huang Xianbei
Join Date: Sep 2013
Location: Yangzhou,China
Posts: 298
Rep Power: 10
Quote:
 Originally Posted by styleworker Without any error message, we can't give you an advice. If you have just inserted this peace of code in your equation, your dimensions probably don't match. The dimension of the in the UEqn should be [kg/m^2s^2], because it is a volume force [N/m^3]. Your volume force should be implemented like this: Code: ``` fvVectorMatrix UEqn ( fvm::ddt(rho, U) + fvm::div(rhoPhi, U) - fvm::laplacian(muEff, U) - (fvc::grad(U) & fvc::grad(muEff)) + (rho*(omega ^ (omega ^ mesh.C()))) //Centrifugal Acceleration );```
Hi,styleworker:
Thank you, but my UEqn is without rho, just looks like fvm::ddt(U), so this is no the exact reason. I have solved this problem by identify the centrifugal force as a vector field, so this works well.

 March 25, 2015, 12:16 #8 Member   Join Date: May 2012 Posts: 55 Rep Power: 11 I've got a private message concerning this topic. In more recent releases of interFoam transportProperties isn't initiated explicitly in createFields.H. Therefore this code snippet has to be implemented before dimensionedVector omega is set: Code: ```IOdictionary transportProperties ( IOobject ( "transportProperties", runTime.constant(), mesh, IOobject::MUST_READ, IOobject::NO_WRITE ) );``` Another good tutorial is: https://openfoamwiki.net/index.php/H...Make_a_Tornado

 Thread Tools Search this Thread Search this Thread: Advanced Search Display Modes Linear Mode

 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 OffTrackbacks are Off Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post be_inspired OpenFOAM Programming & Development 10 September 14, 2018 12:12 norger FLUENT 1 October 12, 2011 02:55 colopolo CFX 13 October 4, 2011 23:03 kumar FLUENT 2 May 29, 2008 04:33 waynezw0618 OpenFOAM Running, Solving & CFD 49 April 8, 2008 05:23

All times are GMT -4. The time now is 18:23.

 Contact Us - CFD Online - Privacy Statement - Top