CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   chtMultiregionFoam (http://www.cfd-online.com/Forums/openfoam/71860-chtmultiregionfoam.html)

msarkar January 18, 2010 07:08

chtMultiregionFoam
 
Hello,

I am trying to simulate natural convection inside a cavity with conjugate heat transfer using OpenFOAM-1.5. I am new in OpenFoam but not in CFD. I think chtMultiregionFoam solver can be used for my problem but there is no tutorial available for chtMultiregionFoam in OF1.5. Could you please guide me how to start? I found this solver within Application/solvers folder but I don't have any idea how to use it. what are the files (within constant, intial (0) & system folder) I need to have to use this solver. Please help me......

Details of my Simulation:
2D square cavity, top and bottom walls are considered as adiabatic.
The right wall is heated by a solid heater maintained at 350K and left side is maintained at 300K.

fra76 January 20, 2010 13:13

If I'm not wrong, there is a tutorial for it in 1.6. You can try to have a look to it.
Moreover, if you have constant temperatures on the walls, do you really need this solver? Maybe buoyantFoam is enough for your case. Try to have a look to its tutorial as well.

Hope this helps,
Francesco

msarkar January 22, 2010 01:55

Thank you Francesco for your help!
Actually our interest is to look at the temperature distribution within the solid wall and how the wall thickness affects heat transfer. I think buyantSimpleFoam solver is applicable only for fluid region. that's the reason to choose chtMultiRegionFoam. I found a tutorial for conjugate heat transfer in OF 1.6. Can you please help me to create multi-region and define solid and fluid? I ran the blockMesh as it was with tutorial chtMultiRegionFoam/multiRegionHeater but it created only single region (rectangular box). guess, I need to create different blocks and patches using blockMeshDict and define some blocks as solid and some as fluid. If I am wrong, please correct me. If possible, please guide me how to run this tutorial. I ran the blockMesh then tried to run chtMultiRegionFoam solver but it did not run. My intension was to run the tutorial first without changing anything and learn how it works then implement it in my problem.
Please help me to run chtMultiRegionFoam solver. I would appreciate any help..

fra76 January 22, 2010 13:21

If you are interested in what happens in the walls, then chtMultiRegion should be what you need. It wasn't clear to me from your first email, sorry...

I do not have 1.6 version installed here and I connot try what I'm thinking, but looking at multiRegionHeater the tutorial files, you have to run setSet after blockMesh in order to create the needed cellZones, then you have to run changeDictionary to set up the BC (check system/*/checkDictionaryDict).


Hope this helps,
Francesco

msarkar January 25, 2010 05:33

Francesco, I very much appreciate your help! I was able to run the chtMultiRegion solver with the help of you and Allrun file that comes with this tutorial but I am not able to visualize the results like p, T, U etc. If I open paraView after completing the run, I can visualize the computational domain coloring by vtkCompositeIndex but there is nothing to visualize in Volume Fields options. If you have any suggestions, please let me know.

Thanks!

kpm January 25, 2010 06:54

1) Try to manually open the files for each region in paraview (e.g. air, solid, whatever the names for the regions are).
and
2) increment the time in paraview if a region doesn't have a value for time 0.

kawuppdich January 25, 2010 09:41

I have another question: how can I use this solver for steady problems?

kpm January 25, 2010 10:16

The simplest approach would be to run it unsteady and wait until the fields reach a steady state.

msarkar January 26, 2010 23:56

Quote:

Originally Posted by kpm (Post 243668)
1) Try to manually open the files for each region in paraview (e.g. air, solid, whatever the names for the regions are).
and
2) increment the time in paraview if a region doesn't have a value for time 0.

Kpm,
Thanks a lot for your help!

msarkar January 28, 2010 23:30

I am facing another problem with this solver - when I am trying to run it with turbulence natural flow inside the cavity, initially it is running few time steps (around 50-100) and then the calculated deltaT (time step) is very small (about 10^-7) and it is stopped working, giving error message. I tried to reduce the time step but it did not work. The error message is posted below. If anyone can give me clue how to tackle this problem,that will be very helpful.

Thanks in advance.

Solving for fluid region airfield
diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
DILUPBiCG: Solving for Ux, Initial residual = 0.6638768, Final residual = 2.307235e-09, No Iterations 13
DILUPBiCG: Solving for Uy, Initial residual = 0.6217526, Final residual = 2.354716e-09, No Iterations 13
DILUPBiCG: Solving for h, Initial residual = 0.2961225, Final residual = 3.274624e-09, No Iterations 13
Min/max T:289.1943 329.1744
GAMG: Solving for p, Initial residual = 0.01014446, Final residual = 9.33863e-11, No Iterations 3
diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors (airfield): sum local = 1.581659e-12, global = 1.38025e-13, cumulative = -1.123369e-10
#0 Foam::error::printStack(Foam::Ostream&) in "/home/msarkar/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libOpenFOAM.so"
#1 Foam::sigFpe::sigFpeHandler(int) in "/home/msarkar/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libOpenFOAM.so"
#2 ?? in "/lib/libc.so.6"
#3 Foam::GAMGSolver::scalingFactor(Foam::Field<double >&, Foam::Field<double> const&, Foam::Field<double> const&, Foam::Field<double> const&) const in "/home/msarkar/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libOpenFOAM.so"
#4 Foam::GAMGSolver::scalingFactor(Foam::Field<double >&, Foam::lduMatrix const&, Foam::Field<double>&, Foam::FieldField<Foam::Field, double> const&, Foam::UPtrList<Foam::lduInterfaceField const> const&, Foam::Field<double> const&, unsigned char) const in "/home/msarkar/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libOpenFOAM.so"
#5 Foam::GAMGSolver::Vcycle(Foam::PtrList<Foam::lduMa trix::smoother> const&, Foam::Field<double>&, Foam::Field<double> const&, Foam::Field<double>&, Foam::Field<double>&, Foam::Field<double>&, Foam::PtrList<Foam::Field<double> >&, Foam::PtrList<Foam::Field<double> >&, unsigned char) const in "/home/msarkar/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libOpenFOAM.so"
#6 Foam::GAMGSolver::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const in "/home/msarkar/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libOpenFOAM.so"
#7 Foam::fvMatrix<double>::solve(Foam::dictionary const&) in "/home/msarkar/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libfiniteVolume.so"
#8 main in "/home/msarkar/OpenFOAM/OpenFOAM-1.6/applications/bin/linux64GccDPOpt/chtMultiRegionFoam"
#9 __libc_start_main in "/lib/libc.so.6"
#10 _start at /usr/src/packages/BUILD/glibc-2.9/csu/../sysdeps/x86_64/elf/start.S:116

kpm January 29, 2010 08:05

Your time step is quite small indeed.
Suggestions:
- Write a result immediately before the case crashes, check fields (good candidate: U) in paraview
- U is larger than expected? => Try to find out why. Check e.g. boundary conditions and/or fluid properties
- Check Your mesh. Any very very small cells?
- Does it run without turbulence model? If yes, check all settings related to turbulence model.
- If all of this doesn't help You could still try OpenFOAM 1.6 or newer.

msarkar February 1, 2010 07:36

Quote:

Originally Posted by kpm (Post 244210)
Your time step is quite small indeed.
Suggestions:
- Write a result immediately before the case crashes, check fields (good candidate: U) in paraview
- U is larger than expected? => Try to find out why. Check e.g. boundary conditions and/or fluid properties
- Check Your mesh. Any very very small cells?
- Does it run without turbulence model? If yes, check all settings related to turbulence model.
- If all of this doesn't help You could still try OpenFOAM 1.6 or newer.


Hi Kpm,
Thanks for your suggestions! Still it's not working with turbulence flow and I don't have any clue what is wrong. This solver is running without turbulence. I think I changed all settings related to turbulence.

Inside constant folder, in airfield the RAS properties are follows;
RASModel kEpsilon;

turbulence on;

printCoeffs on;

kEpsilonCoeffs
{
Cmu 0.09;
C1 1.44;
C2 1.92;
C3 -0.33;
sigmak 1;
sigmaEps 1.3;
Prt 1;
}

and in turbulence properties file I changed the simulationType as RASModel;

I provided all initial and boundary values for k & epsilon. Still it is not running. If anyone has any clue what's wrong there or how to tackle this problem, please let me know.

msarkar February 2, 2010 00:14

Fluid Properties:

In thermophysical properties file, what are the scalars?

thermoType hPsiThermo<pureMixture<constTransport<specieThermo <hConstThermo<perfectGas>>>>>;

air 1 28.9 1000 0 1.8e-05 0.7

I guess these are: rho (density), ?(don't know), cp (specific heat), ?(don't know), mu(dynamic viscosity), Pr (Prandtl number) respectively.

If I am wrong, please correct me and help me to know other parameters.

Any help would be greatly appreciated.

ouafa February 4, 2010 11:28

hi mSarkar,
are you able to run the chtMultiRegion solver with 1.5 version? because i tryed but i can't i've some error like :
Selecting thermodynamics package hThermo<pureMixture<constTransport<specieThermo<hC onstThermo<perfectGas>>>>>

Not Implemented
Trying to construct an genericFvPatchField on patch bottomAir_to_leftSolid of field h#0 Foam::error::printStack(Foam::Ostream&) in "/home/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libOpenFOAM.so"
#1 Foam::error::abort() in "/home/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libOpenFOAM.so"
#2 Foam::genericFvPatchField<double>::genericFvPatchF ield(Foam::fvPatch const&, Foam::DimensionedField<double, Foam::volMesh> const&) in "/home/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libfiniteVolume.so"
#3 Foam::fvPatchField<double>::addpatchConstructorToT able<Foam::genericFvPatchField<double> >::New(Foam::fvPatch const&, Foam::DimensionedField<double, Foam::volMesh> const&) in "/home/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libfiniteVolume.so"
#4 Foam::fvPatchField<double>::New(Foam::word const&, Foam::fvPatch const&, Foam::DimensionedField<double, Foam::volMesh> const&) in "/home/OpenFOAM/OpenFOAM-1.5/applications/bin/linux64GccDPOpt/chtMultiRegionFoam"
#5 Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::GeometricBoundaryField::GeometricB oundaryField(Foam::fvBoundaryMesh const&, Foam::DimensionedField<double, Foam::volMesh> const&, Foam::List<Foam::word> const&) in "/home/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libbasicThermophysicalModels.so"
#6 Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::GeometricField(Foam::IOobject const&, Foam::fvMesh const&, Foam::dimensionSet const&, Foam::List<Foam::word> const&) in "/home/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libbasicThermophysicalModels.so"
#7 Foam::hThermo<Foam::pureMixture<Foam::constTranspo rt<Foam::specieThermo<Foam::hConstThermo<Foam::per fectGas> > > > >::hThermo(Foam::fvMesh const&) in "/home/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libbasicThermophysicalModels.so"
#8 Foam::basicThermo::addfvMeshConstructorToTable<Foa m::hThermo<Foam::pureMixture<Foam::constTransport< Foam::specieThermo<Foam::hConstThermo<Foam::perfec tGas> > > > > >::New(Foam::fvMesh const&) in "/home/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libbasicThermophysicalModels.so"
#9 Foam::basicThermo::New(Foam::fvMesh const&) in "/home/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libbasicThermophysicalModels.so"
#10 main in "/home/OpenFOAM/OpenFOAM-1.5/applications/bin/linux64GccDPOpt/chtMultiRegionFoam"
#11 __libc_start_main in "/lib64/libc.so.6"
#12 Foam::regIOobject::readIfModified() in "/home/OpenFOAM/OpenFOAM-1.5/applications/bin/linux64GccDPOpt/chtMultiRegionFoam"

From function genericFvPatchField<Type>::genericFvPatchField(con st fvPatch& p, const DimensionedField<Type, volMesh>& iF)
in file fields/fvPatchFields/basic/generic/genericFvPatchField.C at line 45.
FOAM aborting
Aborted
can you help me plz?
thank's in advance,
Ouafa

msarkar February 5, 2010 02:53

hi Ouafa,

I did not try with OF-1.5 but It ran successfully in OF-1.6. I suggest you to install 1.6 and try it.

Thanks

ouafa February 5, 2010 04:14

Thank you for response i'll try!
have a nice day,
ouafa

msarkar February 10, 2010 06:35

Hi,

I ran the chtMultiRegionFoam solver with 1.6 version and got results. Basically I ran the model with two different kind of meshes and the results are varied a lot. I do not have any clue why I am getting this much difference!!!

In both cases, I generated mesh using blockmesh. In first case, I divided the domain in four regions to make mesh gradation and mesh gradation goes within the solid. This mesh does not capture same feature on both boundaries of the fluid domain. So I simulated case 2.

In case 2, I divided the domain in six regions, four of them are within fluid to create mesh gradation and two of them are within solid region. In this case, I have same mesh size on every boundary of the fluid domain. Basically it supposed to capture same feature on every boundaries of fluid region. I have drawn temperature variation along center of the domain. Temperature is varying 10 degrees between two results. I don't think that is reasonable. If i check mesh sensitivity for each case seperately, there is not much effects.
I have attached here the mesh details and results for both cases. If any one has any clue, please help me.
Thanks!!

msarkar February 10, 2010 07:00

How to attach a word doc file here? I use attachments option and upload the file but it did not show up with my last post. Please help me to upload this file.

suitup February 10, 2010 12:47

1 Attachment(s)
Hm seems working.

I used this button:

http://www.abload.de/img/forumc4gy.png

msarkar February 10, 2010 23:04

2 Attachment(s)
This is case1, mesh details and temperature variation at the center of the domain.


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