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

Adding Boussinesq Approximation to multiphaseEulerFoam?

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By dschmidt

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 18, 2014, 09:38
Default Adding Boussinesq Approximation to multiphaseEulerFoam?
  #1
New Member
 
Dominik Schmidt
Join Date: Mar 2014
Posts: 11
Rep Power: 12
dschmidt is on a distinguished road
Hello,

I'm quite new to openFoam, but I'm trying to implement the Boussinesq approximation into the multiphaseEulerFoam Solver (OF 2.2.x).

My first step was to add a simple temperature-equation for the hole system, including the calculation of rhok, as in other Boussinesq solvers.

TEqn.H:
Code:
       fvScalarMatrix TEqn
            (
                fvm::ddt(T)
                + fvm::div(phi, T)
                - fvm::laplacian(DT, T)
            );
    
        TEqn.relax();
    
        TEqn.solve();
    
        rhok = 1.0 - beta*(T - TRef);
As far as I could see, the gravity term is dealt within the pressure-equation, though I only modified two lines of code:

pEqn.H - lines 85-89
Code:
phiHbyAs[phasei] +=
      rAlphaAUfs[phasei]
      *(
       fluid.surfaceTension(phase)*mesh.magSf()/phase.rho()
       + /*(g & mesh.Sf())*/      fvc::interpolate(rhok)*(g & mesh.Sf())/phase.rho()                   
       );
...

pEqn.H - lines 235-241
Code:
phase.U() =
  HbyAs[phasei]
   + fvc::reconstruct
     (
       rAlphaAUfs[phasei]*/*(g & mesh.Sf())*/ fvc::interpolate(rhok)*(g & mesh.Sf())/phase.rho()
      + rAlphaAUfs[phasei]*mSfGradp/phase.rho()  
      );
Finally, in multiphaseEulerFoam.C I placed the "#include TEqn.H" right after the UEqn.

So my first question is, if this implementation makes sense or am I missing something important?



I also made some modifications to TEqn based on http://www.cfd-online.com/Forums/ope...er-solver.html
Code:
{
volScalarField rhoCp = fluid.rho()*fluid.Cp();

surfaceScalarField kByCpf = fvc::interpolate(fluid.kappa()/rhoCp + sgsModel->nut()/fluid.Prt());      

 fvScalarMatrix TEqn 
 ( 
   fvm::ddt(T) 
 + fvm::div(phi, T)
 - fvm::laplacian(kByCpf, T) 
 ); 

TEqn.relax();

TEqn.solve();

rhok = 1.0 - beta*(T - TRef);
}
And tried to validate the modified multiphsaeEulerFoam against buoyantBoussinesqPimpleFoam, but as you can see in the picture, the temperature evolution is different (looks like lower Rayleigh Nr. with mod.MultiphaseSolver?), and so the velocities are different, too.

left: buoyantBoussinesqPimpleFoam | right: multiphaseEulerFoam-Boussinesq
boussinesqSmall.jpg
Setup:
Fluid: Air (rho: 1.205; beta: 3.43e-03; Pr/Prt 0.71, nu: 15.11e-6; Cp: 1.005, kappa(multiphase): 0.0257)
T_left: 303 K
T_right: 283 K
TRef: 293 K



I believe/hope the reason can be found in the different TEqn-implementations, rather then in the PEqn, but would be glad if someone could support this assumption, and suggests an easy way to validate the multiphaseBoussinesq-version.

My first idea would be to edit the TEqn of PimpleBoussinesq Solver so it matches the TEqn with fixed diffusion coeff. (DT) and compare the results with the modified multiphaseSolver.

\\EDIT:
After implementing the same TEqn in both solvers I couldn't see much difference. Then I remembered that multiphaseEulerFoam
always has a residual phase fraction for overcoming the problems with non-phase intensive handling of the momentum equations.
So I edited the transport properties for the second phase (alpha uniform 0) to match the ones of the "alpha uniform 1" phase (air).
After that the temperature distribution looks more like the one with buoyantBoussinesqPimpleFoam, but the velocities are still lower
with the modified multiphaseSolver.
So the differences seem to be related to the fact, that multiphaseEulerFoam is not designed for dealing with a single phase system ?



Thanks !
tom_flint2012 likes this.

Last edited by dschmidt; March 19, 2014 at 04:36.
dschmidt is offline   Reply With Quote

Old   January 16, 2017, 16:40
Default Why no change to UEqns.h
  #2
Member
 
Thomas Flint
Join Date: Jan 2016
Posts: 60
Rep Power: 10
tom_flint2012 is on a distinguished road
Hello.
I have implemented your approach for the boussinsq approximation in multiphaseeulerfoam.

Please may you explain to me why you don't add a term in the UEqns.h file. Your advice would be greatly appreciated.

Best regards,

Tom

EDIT

My sincere apologies, I've just seen the peqn.h file again where the ueqns are modified. Apologies for any inconvenience.

Best regards,

Tom

Last edited by tom_flint2012; January 17, 2017 at 03:10.
tom_flint2012 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
InterFoam with boussinesq approximation sinusmontis OpenFOAM Running, Solving & CFD 2 October 25, 2020 12:21
Boussinesq approximation, help please! engahmed FLUENT 0 May 20, 2010 11:25
Question on boussinesq approximation panos_metal FLUENT 1 January 11, 2010 11:18
boussinesq approximation jamal FLUENT 2 March 25, 2008 08:57
Boussinesq approximation again Gabriel Main CFD Forum 3 May 11, 2000 09:24


All times are GMT -4. The time now is 10:42.