CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   buoyantBoussinesqPisoFoam: A detailed explanation (https://www.cfd-online.com/Forums/openfoam/72027-buoyantboussinesqpisofoam-detailed-explanation.html)

ashvinc9 September 17, 2012 03:54

buoyantBoussinesqPisoFoam
 
Dear All,

Thank you for your wonderful posts. I want to use the "buoyantBoussinesqPisoFoam" solver my ABL flow simulation. Since I am using OpenFOAM-2.1.x version I didn't find any tutorial or solve code it self. I will appreciate if someone provide me any tutorial using "buoyantBoussinesqPisoFoam" or any other information on how to use this solver in 2.1 version.

Thank you !

Ashvin

mchurchf September 17, 2012 10:22

Ashvin,

We have taken buoyantBoussinesqPisoFoam and modified it quite a bit to specifically do ABL flow. Please visit the National Renewable Energy Laboratory's (NREL) National Wind Technology Center's (NWTC) site where we have the modified code, etc. http://wind.nrel.gov/designcodes/simulators/sowfa/

Matt

ashvinc9 September 20, 2012 10:47

I have downloaded the code. Thank you very much Matt.

-Ashvin

DineshramBalaji November 14, 2012 14:42

BuoyantBoussinesqPimpleFOAM
 
Hi,

I am new to Openfoam. I am trying to import a case from transientsimpleFoam and solve it in BuoyantBoussinesqPimpleFoam. There seems to be error in p_rgh file. The error goes like this.

--> FOAM FATAL ERROR:

request for surfaceScalarField phi from objectRegistry region0 failed
available objects of type surfaceScalarField are


From function objectRegistry::lookupObject<Type>(const word&) const
in file /home/dinesh/OpenFOAM/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude/objectRegistryTemplates.C at line 131.

Can you give me a suggestion on this?

Sherlock_1812 September 25, 2013 00:58

Walls replaced by atmosphere at both ends?
 
Dear Matthew,

I found it appropriate that I post my question here. I've made slight changes to the hot Room example by replacing the floor and ceiling with free surface. I have changed my temperature and pressure boundary conditions accordingly, but there is a slight problem

I have a uniform pressure field (0) throughout the domain, when in reality there has to be a hydrostatic variation of pressure. The height of the domain is 0.001 m.

Below is my 0/p_rgh file. Can you help identify the problem?

Code:

boundaryField
{
    top
    {
        type            totalPressure;
        p0              uniform 0;
        U              U;
        phi            phi;
        rho            rhok;
        psi            none;
        gamma          1;
        value          uniform 0;
    }

    base
    {
        type            buoyantPressure;
        rho            rhok;
        value          uniform 0;
    }

    leftWall
    {
        type            buoyantPressure;
        rho            rhok;
        value          uniform 0;
    }

    rightWall
    {
        type            buoyantPressure;
        rho            rhok;
        value          uniform 0;
    }

    frontAndBack
    {
    type        empty;
    }
}

Thanks in advance

mchurchf September 25, 2013 09:11

What exactly is the problem? Do you mean after the solution develops, the pressure remains uniform, or do you mean that you aren't sure how to initialize the flow to have a hydrostatic variation?

Keep in mind that p_rgh is not static pressure. It is (p - rho_k*g*h)/rho_0, where rho_k is the density that comes from the Boussinesq approximation based on temperature and rho_0 is the constant density of the incompressible equations, so the hydrostatic variation is subtracted out.

Sherlock_1812 September 25, 2013 09:20

Hi Matthew,

I mean the latter. I'm not sure how to initialise the pressure with the hydrostatic variation.

So from your explanation, should I nullify the effect of the subtraction that p_rgh does?

mchurchf September 25, 2013 09:42

I make a custom field setting utility (you could look at the setFields code). You could really just take buoyantBoussinesqPisoFoam and strip out the whole time loop and replace it with a piece of code that says something like:


// Set the internal field values.
scalar p0 = 0.0;
scalar g = 9.81;
forAll(p_rgh,cellI)
{
scalar z = mesh.C()[cellI].z();
p_rgh[cellI] = p0 + g*z;
}

// Update the boundary values.
p_rgh.correctBoundaryConditions();

// Write out the updated field.
Info<< "Writing field p_rgh" << endl;
p_rgh.write();






Then compile it and run it on before running the solver.

Sherlock_1812 September 25, 2013 11:12

I'll use this utility and proceed with the solution.

Many thanks, Matthew!

be_inspired April 8, 2014 12:23

2 Attachment(s)
Matthew, All:

It is also needed to initialize the temperature in the internal Field?

I am trying to simulate a flat terrain with a bump in the middle using buoyantBoussinessqSimpleFoam based on stable conditions.
Ground temperature is 0. Sky temperature is 7K. Tref=0 K ( I have subtract 288K=Tref because my inlet profile is in relation to the monin-obukov theory as theta(z)-theta(0)) . Theta as the potential temperature.
p_rgh field has been initialized as p_rgh(z) =0 - 9.81*pos().z but I think that this is not correct.
When there is no T variation, rhok=1 so p_rgh=p-rhok*g*h=0 where p(static) is p=-rho*g*h.

p is not initialized because is not read accorting to the createFields.H file
T field has been initialzed constant and equal to 7K but I am not sure if it is needed to initialize to calculate properly rho_k and so, calculate internally r_rgh correctly
Tref = 0K( transportProperties)
U and T profiles at the inlet are based on Monin-Obukov theory for stable conditions
k and epsilon profiles at inlet are based on Monin-Obukov theory for stable conditions
For p and p_rgh, the BC at the patches and ground is set as buoyantPressure

The case is almost the same as the case of panda60, but there is no final confirmation about the correct set up. If possible, it would be great to make a summary of this simple case because it would be the starting point for any wind engineering simulation in a stratification state.

The simulation runs and the residuals are going down but at 4000 iterations k and epsilon start a warning because of bounding ( max k=17, max epsilon 5).

I have uploaded 2 animated gif files for T field and p_rgh field. Any idea?
p_rgh has been initialize as "0-9.81*pos().z" using funkySetFields but when 1000 iterations has been run, the field is completely different ( the color scale has changed also). That is because I think p_rgh is not needed to initialize and it is equal 0 when there is not a T variation along height.


Best Regards

leonardo.oliveira September 19, 2014 14:27

Hello M.Monteiro,

I'm trying to reproduce the same case that you posted here, but with a more complex terrain, and I'm having trouble in settin up the initial variables ("0" directory). If possible, could you post your case here or send it to my e-mail (leonardooliveira@ctgas.com.br), so I could use it as a reference?

Thank you in advance,
Sorry for the bad english.

Leonardo Oliveira

leonardo.oliveira September 19, 2014 16:23

Quote:

Originally Posted by be_inspired (Post 484704)
Matthew, All:

It is also needed to initialize the temperature in the internal Field?

I am trying to simulate a flat terrain with a bump in the middle using buoyantBoussinessqSimpleFoam based on stable conditions.
Ground temperature is 0. Sky temperature is 7K. Tref=0 K ( I have subtract 288K=Tref because my inlet profile is in relation to the monin-obukov theory as theta(z)-theta(0)) . Theta as the potential temperature.
p_rgh field has been initialized as p_rgh(z) =0 - 9.81*pos().z but I think that this is not correct.
When there is no T variation, rhok=1 so p_rgh=p-rhok*g*h=0 where p(static) is p=-rho*g*h.

p is not initialized because is not read accorting to the createFields.H file
T field has been initialzed constant and equal to 7K but I am not sure if it is needed to initialize to calculate properly rho_k and so, calculate internally r_rgh correctly
Tref = 0K( transportProperties)
U and T profiles at the inlet are based on Monin-Obukov theory for stable conditions
k and epsilon profiles at inlet are based on Monin-Obukov theory for stable conditions
For p and p_rgh, the BC at the patches and ground is set as buoyantPressure

The case is almost the same as the case of panda60, but there is no final confirmation about the correct set up. If possible, it would be great to make a summary of this simple case because it would be the starting point for any wind engineering simulation in a stratification state.

The simulation runs and the residuals are going down but at 4000 iterations k and epsilon start a warning because of bounding ( max k=17, max epsilon 5).

I have uploaded 2 animated gif files for T field and p_rgh field. Any idea?
p_rgh has been initialize as "0-9.81*pos().z" using funkySetFields but when 1000 iterations has been run, the field is completely different ( the color scale has changed also). That is because I think p_rgh is not needed to initialize and it is equal 0 when there is not a T variation along height.


Best Regards

Hello M.Monteiro,

I'm trying to reproduce the same case that you posted here, but with a more complex terrain, and I'm having trouble in settin up the initial variables ("0" directory). If possible, could you post your case here or send it to my e-mail (leonardooliveira@ctgas.com.br), so I could use it as a reference?

Thank you in advance,
Sorry for the bad english.

Leonardo Oliveira

Jost K June 26, 2019 06:52

Higher order temperature density coupling in buoyantBoussinesqPimpleFoam
 
Dear Matthew,
Thanks for the wonderful explanation of buoyantBoussinesqPisoFoam.
If something similar was available for all the OpenFOAM solvers our lives would be a lot easier...:rolleyes:


Towards my problem:

Dear All,

I am using buoyantBoussinesqPimpleFoam for heat transfer simulations in a stratified region of the ocean.
However, for my problem (temperature differences from 5°C to 25°C in water!) Boussinesqs approximation of a linear correlation between temperature and density is clearly inadequate.
For this reason, I am thinking about implementing a higher order polynomial for the temperature density coupling.
Also, in my case, salinity enters the density equation, adding even further nonlinearity.

I am not sure if buoyantBoussinesqPimpleFoams temperature equation remains valid under these circumstances.
Does anyone have an opinion on /experience with this matter?
I just do not have the thermodynamics background to figure this out.

All comments are appreciated!


Cheers,
Jost


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