CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Natural ventilation in a room with windows (https://www.cfd-online.com/Forums/openfoam-solving/138037-natural-ventilation-room-windows.html)

mathieu_135 June 27, 2014 04:12

Natural ventilation in a room with windows
 
1 Attachment(s)
Hi everybody,
I am looking for the best solution (solver and BC) to simulate the natural ventilation of a room.
I would like to take into consideration a room with opening surface on the outdoor, so an indoor temperature and an outdoor temperature at t=0.
In addition, I would also simulate an internal load like the radiation of a human body (in W/m2 ?).
(you can see the enclosed figure)
The wished result could be the evolution of the temperature fields and speed fields into the room.
Can anyone have already coded this kind of case ?? Maybe you can send me please JJ

Don’t hesitate if you have any questions,
Thanks a lot,

Matthieu

tian June 28, 2014 02:06

Natural ventilation in a room with windows
 
Dear Matthieu,

you can try out the: buoyantBoussinesqSimpleFoam Solver. Should be enough for you case.

Bye
Thomas

mathieu_135 June 28, 2014 04:15

Dear Thomas

thanks for your answer but do you know what kind of boundary conditions for the opening on outdoor (windows of the room) ?
Inlet / outlet ?
Pressure ?
...

thanks a lot in advance,

regards,

Mat

tian June 28, 2014 05:43

Natural ventilation in a room with windows
 
1 Attachment(s)
Hi,

I am not sure about your window situation. Do you want open it a Little bit so the aiflow can come in or only set a surface temperature?

Regards,
Thomas

mathieu_135 June 28, 2014 06:33

in fact, I would like to consider a fully open window so, yes the airflow can come from outdoor to indoor.
In addition, I would like to take into account the radiation of an human body in the room for example (radiation in W/m2 ?).

Do you understand my wish ? Have you ever seen this case ??

Thanks for your help.

Mat

tian June 28, 2014 09:58

Dear Mat,

I upload one case. Maybe you can start from this case and adjust it by yourself...

It used buoyantBoussinesqSimpleFoam with k-Omega SST and radiations

https://copy.com/YukaGKRnnBds7kSY

Bye
Thomas

mathieu_135 June 30, 2014 06:40

Hi Thomas,

thanks for your help

I don't manage to run your case with buoyantBoussinesqSimplefoam ... because I am not used to working with snappyhexmesh, I use Salome.


Can you explain me please ?
Thanks again,
Regards,

Mat

matejfor July 3, 2014 03:00

snappy is just the mesher, you may prepare your mesh in any software.
What you need is to run your buoyantBoussinesqSimplefoam on your geometry. Have a look at the tutorial coming with the case.
Just be aware that the solver is using Boussinesq approximation to buoyant forces.

What will be the tricky part are the open windows. Unless you want to prescribe the pressure gradient between doors and window, you need the BC on window to take into account the pressure difference across the window. It would need some testing for a suitable BC settings. Maybe even use the buoyant solver without the Boussinesq approx. calculating the real density difference.

good luck
matej

mathieu_135 July 3, 2014 06:03

Hi,

in fact, I don't manage to run this case, I have several error.

Do you manage to run this case on your computer ?

Regards,

Mat

tian July 3, 2014 10:43

Dear all,

I used OpenFOAM 2.2x. Let me check the case again.... What kind of error?

Bye
Thomas

[EDIT] I upload the case again:
https://copy.com/4HXgDQjMNCPkJHl9

mathieu_135 July 4, 2014 05:53

Dear all,

I copy your files on my computer, I run buoyantBoussinesqSimpleFoam and I have this error :


--> FOAM FATAL IO ERROR:
keyword Cp is undefined in dictionary "/home/etu/OpenFOAM/etu-2.0.0/run/TestRoom_brut/0/T::boundaryField::body_People_body_10"


file: /home/etu/OpenFOAM/etu2.0.0/run/TestRoom_brut/0/T::boundaryField::body_People_body_10 from line 66 to line 70.

From function dictionary::lookupEntry(const word&, bool, bool) const in file db/dictionary/dictionary.C at line 400.

FOAM exiting


Thanks for your help :):)

Mat

mathieu_135 July 9, 2014 01:48

Do you know this error ?

Thanks,

Mat

tian July 9, 2014 02:49

Hi,

yes: "keyword Cp is undefined in dictionary ". So add the "cp" value in "transportProperties" under "constant"-Folder like:

Cp Cp [0 0 0 0 0 0 0] 1000;

Bye
Thomas

mathieu_135 July 9, 2014 03:09

Hi Thomas,

thanks for your answer. And this error, you know ? (sorry, i'm a newby ...)


********************************************
Create mesh for time = 0
 
Reading g
Reading thermophysical properties
Reading field T
Reading field p_rgh
Reading field U
Reading/calculating face flux field phi
Selecting incompressible transport model Newtonian
Creating turbulence model
Selecting RAS turbulence model kOmegaSST
kOmegaSSTCoeffs
{
alphaK1 0.85034;
alphaK2 1;
alphaOmega1 0.5;
alphaOmega2 0.85616;
gamma1 0.5532;
gamma2 0.4403;
beta1 0.075;
beta2 0.0828;
betaStar 0.09;
a1 0.31;
c1 10;
}
Reading field kappat
Calculating field g.h
 
SIMPLE: convergence criteria
field p_rgh tolerance 0.01
field U tolerance 0.001
field T tolerance 0.001
field k tolerance 0.001
field omega tolerance 0.001
 
Starting time loop
Time = 1
 
 
--> FOAM FATAL IO ERROR:
Unknown convection scheme bounded
Valid convection schemes are :
1
(
Gauss
)
 
file: /home/etu/OpenFOAM/etu-2.0.0/run/TestRoom-A/system/fvSchemes::divSchemes::div(phi,U) at line 32.
From function convectionScheme<Type>::New(const fvMesh&, const surfaceScalarField&, Istream&)
in file /home/opencfd/OpenFOAM/OpenFOAM-2.0.0/src/finiteVolume/lnInclude/convectionScheme.C at line 97.
FOAM exiting
 
**********************************

tian July 9, 2014 03:13

Hi,

yes, because you used OpenFOA 2.0. Delete all "bounded" words in "fvScheme".

Bye
Thomas

matejfor July 9, 2014 03:45

Hi the best thing to fight all these errors is:

a) look into tutorial case in $FOAM_TUTORIALS/heatTransfer/<solvername>/<tutorialCase>
for the settings and check your settings against it.

b) is there any reason why you are using 2.0 instead of the latest version 2.3? Where might be some improvements in the solver?

matej

mathieu_135 July 9, 2014 03:53

Hi,

I use VirtualBox (ubuntu), is there any solution to upgrade easily to OF 2.3 on a virtualbox ?

Thanks,
Mat

matejfor July 9, 2014 04:02

Yes, the easiest way is to follow this: http://www.openfoam.org/download/ubuntu.php from your VirtualBox ubuntu window. VirtualBox is just virtual computer, so you have ubuntu runing there just as it would be installed on your computer.

looking here: http://www.openfoam.org/download/history.php there has not been much development in solver itself, but in the BC you may find usefull for your case, like thermal baffles (2 different types), mixed thermal condition.

mat

mathieu_135 July 9, 2014 06:13

I have a lot of difficulties with my OF ....

Now :

************************************************** **********
Starting time loop
Time = 1
DILUPBiCG: Solving for Ux, Initial residual = 1, Final residual = 0.0791183, No Iterations 161
DILUPBiCG: Solving for Uy, Initial residual = 1, Final residual = 0.0792435, No Iterations 42
DILUPBiCG: Solving for Uz, Initial residual = 0, Final residual = 0, No Iterations 0
DILUPBiCG: Solving for T, Initial residual = 1, Final residual = 0.0979706, No Iterations 9
 
--> FOAM FATAL ERROR:
lookup of (1|A(U)) from objectRegistry region0 successful
but it is not a volScalarField, it is a surfaceScalarField
From function objectRegistry::lookupObject<Type>(const word&) const
in file /home/opencfd/OpenFOAM/OpenFOAM-2.0.0/src/OpenFOAM/lnInclude/objectRegistryTemplates.C at line 114.
FOAM aborting
#0 Foam::error::printStack(Foam::Ostream&) in "/opt/openfoam200/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#1 Foam::error::abort() in "/opt/openfoam200/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#2 Foam::Ostream& Foam::operator<< <Foam::error>(Foam::Ostream&, Foam::errorManip<Foam::error>) in "/opt/openfoam200/platforms/linuxGccDPOpt/bin/buoyantBoussinesqSimpleFoam"
#3 Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const& Foam::objectRegistry::lookupObject<Foam::Geometric Field<double, Foam::fvPatchField, Foam::volMesh> >(Foam::word const&) const in "/opt/openfoam200/platforms/linuxGccDPOpt/lib/libfiniteVolume.so"
#4 Foam::fixedFluxPressureFvPatchScalarField::updateC oeffs() in "/opt/openfoam200/platforms/linuxGccDPOpt/lib/libfiniteVolume.so"
#5 Foam::fvMatrix<double>::fvMatrix(Foam::GeometricFi eld<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::dimensionSet const&) in "/opt/openfoam200/platforms/linuxGccDPOpt/bin/buoyantBoussinesqSimpleFoam"
#6 Foam::fv::gaussLaplacianScheme<double, double>::fvmLaplacianUncorrected(Foam::GeometricFi eld<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) in "/opt/openfoam200/platforms/linuxGccDPOpt/lib/libfiniteVolume.so"
#3 Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const& Foam::objectRegistry::lookupObject<Foam::Geometric Field<double, Foam::fvPatchField, Foam::volMesh> >(Foam::word const&) const in "/opt/openfoam200/platforms/linuxGccDPOpt/lib/libfiniteVolume.so"
#4 Foam::fixedFluxPressureFvPatchScalarField::updateC oeffs() in "/opt/openfoam200/platforms/linuxGccDPOpt/lib/libfiniteVolume.so"
#5 Foam::fvMatrix<double>::fvMatrix(Foam::GeometricFi eld<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::dimensionSet const&) in "/opt/openfoam200/platforms/linuxGccDPOpt/bin/buoyantBoussinesqSimpleFoam"
#6 Foam::fv::gaussLaplacianScheme<double, double>::fvmLaplacianUncorrected(Foam::GeometricFi eld<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) in "/opt/openfoam200/platforms/linuxGccDPOpt/lib/libfiniteVolume.so"
#7 Foam::fv::gaussLaplacianScheme<double, double>::fvmLaplacian(Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) in "/opt/openfoam200/platforms/linuxGccDPOpt/lib/libfiniteVolume.so"
#8
in "/opt/openfoam200/platforms/linuxGccDPOpt/bin/buoyantBoussinesqSimpleFoam"
#9
in "/opt/openfoam200/platforms/linuxGccDPOpt/bin/buoyantBoussinesqSimpleFoam"
#10
in "/opt/openfoam200/platforms/linuxGccDPOpt/bin/buoyantBoussinesqSimpleFoam"
#11 __libc_start_main in "/lib/tls/i686/cmov/libc.so.6"
#12
in "/opt/openfoam200/platforms/linuxGccDPOpt/bin/buoyantBoussinesqSimpleFoam"
Aborted
************************************************** **********

tian July 10, 2014 02:15

Dear Matej,

do you still try out my case or your own? Please compare your fvSchemes with a tutorial case like hotRooam. It seem your schemes are wrong for pressure?

Bye
Thomas


All times are GMT -4. The time now is 00:39.