CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

interFoam with centrifugal Force

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 3, 2012, 09:23
Default interFoam with centrifugal Force
  #1
New Member
 
Matthias P
Join Date: May 2010
Posts: 16
Rep Power: 15
MatP is on a distinguished road
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!
MatP is offline   Reply With Quote

Old   January 24, 2013, 05:11
Default
  #2
Member
 
Join Date: May 2012
Posts: 55
Rep Power: 14
styleworker is on a distinguished road
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 10:13.
styleworker is offline   Reply With Quote

Old   January 24, 2013, 11:30
Default
  #3
Member
 
Join Date: May 2012
Posts: 55
Rep Power: 14
styleworker is on a distinguished road
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
styleworker is offline   Reply With Quote

Old   March 30, 2013, 13:14
Default
  #4
New Member
 
Eric Dalmau
Join Date: Mar 2013
Location: Catalonia
Posts: 20
Rep Power: 13
edalmau is on a distinguished road
Thanks a lot for your info styleworker, it was so helpful for my case. I had to add the centrifugal force to MRFInterFoam.
edalmau is offline   Reply With Quote

Old   March 13, 2014, 21:39
Default
  #5
Senior Member
 
Huang Xianbei
Join Date: Sep 2013
Location: Yangzhou,China
Posts: 302
Rep Power: 13
huangxianbei is on a distinguished road
Quote:
Originally Posted by styleworker View Post
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
huangxianbei is offline   Reply With Quote

Old   March 14, 2014, 02:54
Default
  #6
Member
 
Join Date: May 2012
Posts: 55
Rep Power: 14
styleworker is on a distinguished road
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
    );
styleworker is offline   Reply With Quote

Old   March 14, 2014, 06:48
Default
  #7
Senior Member
 
Huang Xianbei
Join Date: Sep 2013
Location: Yangzhou,China
Posts: 302
Rep Power: 13
huangxianbei is on a distinguished road
Quote:
Originally Posted by styleworker View Post
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.
huangxianbei is offline   Reply With Quote

Old   March 25, 2015, 11:16
Default
  #8
Member
 
Join Date: May 2012
Posts: 55
Rep Power: 14
styleworker is on a distinguished road
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
styleworker 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
ActuatorDiskExplicitForce in OF2.1. Help be_inspired OpenFOAM Programming & Development 10 September 14, 2018 11:12
Problem with centrifugal force norger FLUENT 1 October 12, 2011 01:55
Force can not converge colopolo CFX 13 October 4, 2011 22:03
cyclone separator- centrifugal force kumar FLUENT 2 May 29, 2008 03:33
MRFZonesC questions what is the mesh_V and why only Coriolis force no centrifugal force waynezw0618 OpenFOAM Running, Solving & CFD 49 April 8, 2008 04:23


All times are GMT -4. The time now is 05:50.