CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   thermal analysis with buoyantBoussinesqSimpleFoam (http://www.cfd-online.com/Forums/openfoam/74012-thermal-analysis-buoyantboussinesqsimplefoam.html)

andrea.pasquali March 22, 2010 13:25

thermal analysis with buoyantBoussinesqSimpleFoam
 
Hi,
I'd like to simulate the thermal anlysis of a car.
I'm thinking to use the solver "buoyantBoussinesqSimpleFoam".
I saw the post:
- http://www.cfd-online.com/Forums/ope...am-solver.html
- http://www.cfd-online.com/Forums/ope...planation.html

I have some question:
1) Is it possible make what I want with "buoyantBoussinesqSimpleFoam"? Or I'm wronging solver?
2) Is it correct to simulate the heat flux of the engine like a fixedGradient for the Temperature? In this case I need the alfa_eff of the engine! If it exists, does anyone know a stardard value of alfa_eff for an car engine?
3) If I have the correct heat flux of the engine, could I use the BC "wallHeatFlux"? Do I set it into T file?

Before to try with the car, I'm training myself with a simple model: a hot sphere into a room.
I tried before a closed room:
T: initialField 298, fixedGradient for the sphere, zeroGradient for the walls
p: buoyantPressure for all
U: fixedValue (0 0 0) for all
Then I tried to add an inlet in front of the sphere and an outlet in the back side of the sphere:
T: initialField 298, fixedGradient for the sphere, zeroGradient for the walls, inlet and outlet
p: fixedValue 0 for the outlet, buoyantPressure for the other patchs
U: fixedValue (1 0 0) for the inlet, inletOutlet for the outlet, fixedValue (0 0 0) for the other patchs

But I obtain a strange result.
The map of pressure and velocity in a section is not correct: I have over pressure near the inlet and big velocity near the outlet.
My results are quite similar to the results showned in the posts above!!!
Therefore, I made some stream lines: they start straight and when overcome the sphere, they turn on the right!
I though the error was on inlet / outlet BCs! So I started changing the BCs first for inlet and outlet and then for all the patch (I tried also the slip type for the wall) and I entered in a blind loop!

Could anyone give me any suggestion?

Thank for any reply!

Andrea

andrea.pasquali March 23, 2010 11:37

Quote:

Originally Posted by andrea.pasquali (Post 251142)
Therefore, I made some stream lines: they start straight and when overcome the sphere, they turn on the right!

Sorry, they turn in gravity "g" direction!

I tried new BCs:
T: initialField 298, fixedGradient for the sphere, fixedValue $internalField for the walls
p: fixedValue 0 for outlet, buoyantPressure for the other patches
U: fixedValue (1 0 0) for inlet, inletOutlet for outlet, fixedValue (0 0 0) for the other patchs

But with poor results...
In the end I switch of the gravity g (0 0 0) and now the air flow seems correct and goes straight.
But I thinking the results are not correct without g...

Can anyone give me any advice?

Thank for any reply

Andrea

andrea.pasquali March 27, 2010 08:24

3 Attachment(s)
Hello,
I tried these BCs with gravity on (0 0 -9.81).
Temperature
Quote:

internalField uniform 298;

boundaryField
{
inlet
{
type fixedValue;
value $internalField;
}
outlet
{
type fixedValue;
value $internalField;
}
sphere
{
type wallHeatFlux;
heatFlux uniform 5000;
}
tunnel
{
type fixedValue;
value $internalField;
}
}
Velocity
Quote:

internalField uniform (0 0 0);

boundaryField
{
inlet
{
type fixedValue;
value uniform (50 0 0);
}
outlet
{
type inletOutlet;
inletValue $internalField;
value $internalField;
}
sphere
{
type fixedValue;
value uniform (0 0 0);
}
tunnel
{
type slip;
}
}
Pressure
Quote:

internalField uniform 0;

boundaryField
{
inlet
{
type zeroGradient;
}
outlet
{
type fixedValue;
value $internalField;
}
sphere
{
type buoyantPressure;
rho rhok;
value uniform 0;
}
tunnel
{
type slip;
}
}
Now the results look good (figure attached)
Could anyone give me any feedback?
Does exist in literature any experimental test of a hot sphere into air flow to reproduce with buoyantBoussinesqSimpleFoam?

Thanks

Andrea

eugene March 29, 2010 17:46

Hi Andrea,

I suggest you not use fixedValue for pressure as outlet unless it is perpendicular to the direction of gravity. In the new solvers, p = P - pRef, so p will be stratified. Using a fixed value outlet will give rather odd results. There is a new boundary called uniformDensityHydrostaticPressure that will do a better job.

matthias March 29, 2010 19:04

Hello,

I would like to simulate the filling of a tank with hot water using buoyantBoussinesqPisoFoam but I always get an unphysical high velocity in the middle of the tank. In the initial state the tank is already completely filled with cold water.

The tank is a closed cylinder with an inlet at the top and an outlet at the bottom. Both are perpendicular to the direction of gravity.
The BCs are:
U: fixedValue at the inlet, zeroGradient at the outlet, fixedValue(0 0 0) at the walls
T: fixedValue at the inlet, zeroGradient all other patches
p: zeroGradient at the inlet, fixedValue 0 at the outlet, buoyantPressure at the walls.

The inlet velocity is 0.3 m/s but in the middle of the tank (after 1 second simulation time) the velocity raises up to 0.7 m/s.
If I use the buoyantPisoFoam from Version OF-1.5-dev I get reasonable results with the exactly same setup (max velocity remains at ~0.3m/s). In OF-1.5-dev the Boussinesq Approx for density is different from the definition in OF-1.6.
Probably, in OF-1.5-dev the gravity term is absorbed into the pressure gradient?
However, both solvers should give similar results with this setup. So, do I need a special BC for the pressure outlet in OF-1.6?


Best regards

Matthias

eugene March 30, 2010 04:17

Hi Matthias,

You boundary conditions look fine for this case. Your problem must be somewhere else.

andrea.pasquali March 30, 2010 05:58

Hi Eugene!
How are you? thank you very much for your suggestion.
I'm trying the new BC for the outlet. I set
Quote:

outlet
{
type uniformDensityHydrostaticPressure;
rho 1.225;
pRefValue 0;
pRefPoint (0 0 1);
}
Is it correct? The outlet patch is along Z direction (it's parallel to the gravity direction).
Now it's running with 1 processor fine.
I try to use more processor but I got 1 FATAL ERROR during decomposition step!
Quote:

request for uniformDimensionedVectorField g from objectRegistry region0 failed
available objects of type uniformDimensionedVectorField are

0
(
)
What it is? with outlet fixedValue I don't have this problem!

Thanks

eugene March 30, 2010 07:03

The problem is decomposePar does not load the gravity dictionary, so it is not available when the boundary is constructed and therefore causes a fail. This is a general issue with boundaries that try to lookup things from the database during construction - a better solution is to construct fields on-demand.

To fix this, either modify the boundary to check whether g is available before looking it up, or decompose the case with some other boundary like zeroGradient and then manually modify it to the required boundary in each processor directory.

johnb April 22, 2010 16:21

buoyantBoussinesqSimpleFoam: the time step continuity errors blows up to inf.
 
Hi!

I get problems with buoyantBoussinesqSimpleFoam, it must be the mesh or the BC.

Checkmesh gives me:
***Number of edges not aligned with or perpendicular to non-empty directions: 21369
<<Writing 42738 points on non-aligned edges to set nonAlignedEdges
...
Failed 1 mesh checks.

Basically I have a room with a hot cube inside, I use an inlet, outlet, wall, cube-wall and empty (2D case).

The domains simply looks like:
_______________________
| _______[]_____________|

inlet (left side)
outlet (right side)
cube in the middle
top and bottom is wall
empty in the z direction

If I run simpleFoam, everything works just fine, but when i start with buoyantBoussinesqSimpleFoam the time step continuity errors blows up to inf.

I tried many different variants of the pressure BC, but get the same time step continuity errors every time.

Anyone that know why or that has a running case (with inlet and outlet) to send so I can have a look at your setup?

Best regards
John

johnb April 23, 2010 04:20

problem solved
 
Hi

I converted to a 3D case and switch from empty to symmetryPlane instead.
CheckMesh give no errors and the solver works perfect now.

John

andrea.pasquali April 23, 2010 15:17

You can't use type empty for your patch if in normal direction of your patch you have more than one cell.

Regards

johnb April 27, 2010 15:21

Hi,

I am aware of the use of empty patch with just one cell thickness in the third dimension. What I am saying is that using a 2D case with empty patch wont work for me. My solution was to convert to a real 3D case or stick with the 2D case but use symmetryPlane patch instead of empty.

John

eugene May 10, 2010 04:31

After a lot of trouble, I have found that the new buoyantBousinesq line of solvers really are no good for real world cases. The main problem is the grad(p) and gravity density terms have to cancel out in a stationary fluid, but due to discretisation errors in the grad(p) term, this does not happen on all but the simplest meshes.

santoo_cfd May 11, 2010 01:18

Hi Eugene,

After a expert like you comments on these set of solver, My soul is relaxing now knowing there are other people also feeling the same heat with boussinesq solvers.

Forgive my poetry, I am also these days using boussinesq set of solvers for solving a complex heat exchanger problem. I am also facing the problems in matching with experimental results.

I have posted my problems in the following post.
http://www.cfd-online.com/Forums/ope...tml#post258255

Regards
Santhosh

eugene May 11, 2010 04:26

What would you like me to comment on?

The div(phi)*T term prevents local errors due to non-consrvation of fluxes in unconverged velocity fields. It is zero at conergence.

santoo_cfd May 11, 2010 07:25

Hi Eugene,

I figured out that little back. Currently I facing convergence problems If I use linear in place of upwind.

Also, If you look at the last post in the above thread (http://www.cfd-online.com/Forums/ope...tml#post258255), I posted residual plot with sensitivity of turbulent prandtl number, Initially, unknowingly, I have used Prt=5 in which case solution is converged.

Later I thought it is not correct to use Prt=5, so I changed it to 0.8 where I could not get convergence.

Can u comment on whether it is proper to use Prt = 5. (I have read an article showing Prt used as turbulence generation due to buoyancy in k equation.)

Regards
Santhosh

santoo_cfd May 11, 2010 07:52

Hi,

I read with wikie article

http://en.wikipedia.org/wiki/Turbulent_Prandtl_number

It says Prt range is 0.7-0.9. So I think I should stick to Prt=0.8 and play with others to get the residual down..

Thanks
Santhosh

vgarbero May 25, 2010 09:27

Dear Eugene,
what do your words mean?
Quote:

Originally Posted by eugene (Post 258132)
After a lot of trouble, I have found that the new buoyantBousinesq line of solvers really are no good for real world cases. The main problem is the grad(p) and gravity density terms have to cancel out in a stationary fluid, but due to discretisation errors in the grad(p) term, this does not happen on all but the simplest meshes.

The buoyantBoussinesq solvers are not applicable to simulate, for example, the heating of a building immersed in the atmosphere?

Thank you,

Valeria

santoo_cfd May 26, 2010 01:38

My observation is that BuoyantBoussinesq simple foam predicts the flow and temperature profile well. But when it comes to validation (comparing the number) I am finding difficulty.

I tried thermal cavity, the flow profiles are pretty good but validation ( non dimensional velocity and temperature at mid section) is not impressive.

The same observation I have found with industrial heat transfer problem.


PS: I have used only upwind (first order). I could not do linear (second order) as it is not converging well.

Regards,
Santhosh.

vgarbero May 26, 2010 02:50

1 Attachment(s)
Dear Santhosh,

thank you!
I am also trying to simulate a heated cavity immersed in a neutral atmoshere but I am having difficulties to impose boundary conditions on p, U and T.

U: I imposed an experimental velocity profile on inlet, a driving velocity on top and no-slip condition on wall.
p: I imposed buoyantPressure condition on inlet, top, outlet and wall. I tried to impose on outlet both the uniformDensityHydrostaticPressure condition and a stratified profile -rho*g*z but the velocity assumed high and unphysical values.
T: I imposed uniform profile (T=300 K) on inlet, top and wall (I started to simulate the case without heating to compare the results with those obtained by simpleFoam.. I found some differences in U(1), k and epsilon profiles).

There is someone who could help me? Thank you!

Valeria


All times are GMT -4. The time now is 22:28.