|
[Sponsors] |
June 28, 2010, 02:26 |
chtMultiRegionFOAM-boundary condition error
|
#1 |
Member
MSarkar
Join Date: Dec 2009
Posts: 99
Rep Power: 16 |
Hello FOAMERS,
I am trying to simulate a 2D electronic component cooling system. Where I have three different solids (2 ICs and 1 PCB) regions and rest are air, one inlet and one outlet. The ICs are generating constant heat. Could anyone help me to define heat generation in a solid region using chtMultiRegionFoam? Currently I am trying with constant temperature in ICs but I am getting error as follows: --> FOAM FATAL ERROR: gradientInternalCoeffs cannot be called for a calculatedFvPatchField on patch bottomAir_to_rightAir of field h in file "/home2/msarkar/OpenFOAM/msarkar-1.6.x/run/project/project3/run1/0.001/bottomAir/h" You are probably trying to solve for a field with a default boundary condition. From function calculatedFvPatchField<Type>::gradientInternalCoef fs() const in file /home2/galleon/freefoam_pu_build/include/finiteVolume/../../../freefoam/src/finiteVolume/fields/fvPatchFields/basic/calculated/calculatedFvPatchField.C at line 187. FOAM exiting I did not understand this error as I did not define the field h anywhere. I guess it is defined somewhere inside the code but I am not sure where it is. Any help on this regard would be very much appreciated. The computational domain is attached here. The domain has seven different regions - three solid and four air fields. Thanks M. Sarkar |
|
June 28, 2010, 04:31 |
|
#2 |
Member
Robertas N.
Join Date: Mar 2009
Location: Kaunas, Lithuania
Posts: 53
Rep Power: 17 |
The field 'h' is defined in file 'fluid/setRegionFluidFields.H' as
basicPsiThermo& thermo = thermoFluid[i]; volScalarField& h = thermo.h(); and then it's used in 'fluid/hEqn.H'. What boundary conditions did you set? If you have a constant heat generation, maybe you can define a heat source in solid regions? For this purpose you could modify the equation in 'solid/solveSolid.H' to be like this: tmp<fvScalarMatrix> TEqn ( fvm::ddt(rho*cp, T) == fvm::laplacian(K, T) + Q ); and declare a heat source field Q. This field can be initialized before running the case using 'setField' or assigned straight in the code. I used this approach myself but I'm not sure how reliable it is. |
|
June 28, 2010, 05:49 |
|
#3 | |
Member
MSarkar
Join Date: Dec 2009
Posts: 99
Rep Power: 16 |
Hi Robertas,
Thanks a ton for your reply. I think there is no option to define any boundary conditions for h. Then why it is giving the following error and how to resolve this? Do I need to modify the code anywhere for this? --> FOAM FATAL ERROR: gradientInternalCoeffs cannot be called for a calculatedFvPatchField on patch bottomAir_to_rightAir of field h in file "/home2/msarkar/OpenFOAM/msarkar-1.6.x/run/project/project3/run1/0.001/bottomAir/h" You are probably trying to solve for a field with a default boundary condition. From function calculatedFvPatchField<Type>::gradientInternalCoef fs() const in file /home2/galleon/freefoam_pu_build/include/finiteVolume/../../../freefoam/src/finiteVolume/fields/fvPatchFields/basic/calculated/calculatedFvPatchField.C at line 187. FOAM exiting Quote:
bottomAir_to_pcb { type solidWallMixedTemperatureCoupled; neighbourFieldName T; Kcond Kcond; value uniform 300; } My intention is first run the case then change the source code if I need to do so to accommodate the heat generation part. If I understood your reply correctly, I have to modify the source code to accommodate the heat generation as specified and recompile the solver. There is no other way to define constant heat generation from solid parts, is that correct? You mentioned that you used the above approach. I guess you also simulated similar type of case like me. Could you give me your case file? So I can see how you initialized the field Q. Regards M. Sarkar |
||
June 29, 2010, 07:26 |
|
#4 |
Member
Robertas N.
Join Date: Mar 2009
Location: Kaunas, Lithuania
Posts: 53
Rep Power: 17 |
The field 'h' is read from the thermophysical properties file; there is an equation for 'h' (fluid/hEqn.H), and the field 'h' is defined in fluid/setRegionFluidFields.H. Evidently, its boundary values are recalculated from other field values, therefore, it depends on how you set up BCs of other fields. I cannot tell anything about this specific error yet -- haven't dug so deep yet :-)
I attach a couple of cases that I have run myself. The 1st one contains two solid regions, in contact with each other, hovering in the air. One of them has a heat source inside. You can set also a heat source inside another one -- edit the file heat2/Q; currently, the heat source is commented out there. Another case contains two solid regions with heat sources inside and an air flow inbetween. Both cases are 2D. Air is green, solids are blue and yellow, heat sources (inside solids) are red. To run these cases, you'll have to recompile the chtMultiRegionFoam solver: here are the modified source files that should go into the 'solid' folder. case1 case2 Last edited by r08n; June 29, 2010 at 07:32. Reason: Added source files |
|
June 30, 2010, 03:46 |
|
#5 |
Member
MSarkar
Join Date: Dec 2009
Posts: 99
Rep Power: 16 |
Hi Robertas,
Thank you very much for sharing the source and case files. I will follow your instruction to accommodate heat generation inside solid and recompile the solver. I will also update you from my side and try to resolve the current error I am getting. Once again thank you. Regards M. Sarkar |
|
June 30, 2010, 04:24 |
controlDict in chtMultiRegionFoam
|
#6 |
Senior Member
maddalena
Join Date: Mar 2009
Posts: 436
Rep Power: 23 |
Hi Robertas,
I included heat source generation on chtMultiRegionFoam as well, the solver compiled fine and cases runs without error. I did it on my own, but changes are similar to the files you attached. the only things that is different is that I wrote solveSolid.H as: Code:
tmp<fvScalarMatrix> TEqn ( fvm::ddt(rho*cp, T) - fvm::laplacian(K, T) - H ); TEqn().relax(); TEqn().solve(); I guess the problem in my case is with controlDict parameters:
Thanks mad PS: you set air/U as: Code:
internalField uniform (0 0 0); Code:
Region: air Courant Number mean: 0 max: 0 #0 Foam::error::printStack(Foam::Ostream&) in "/root/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/libOpenFOAM.so" #1 Foam::sigFpe::sigFpeHandler(int) in "/root/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/libOpenFOAM.so" #2 ?? in "/lib/libc.so.6" #3 Foam::divide(Foam::Field<double>&, Foam::UList<double> const&, Foam::UList<double> const&) in "/root/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/libOpenFOAM.so" #4 void Foam::divide<Foam::fvsPatchField, Foam::surfaceMesh>(Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh>&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&) in "/root/OpenFOAM/root-1.6.x/applications/bin/linux64GccDPOpt/chtMultiRegionHeatSourceFoam" #5 Foam::tmp<Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> > Foam::operator/<Foam::fvsPatchField, Foam::surfaceMesh>(Foam::tmp<Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> > const&, Foam::tmp<Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> > const&) in "/root/OpenFOAM/root-1.6.x/applications/bin/linux64GccDPOpt/chtMultiRegionHeatSourceFoam" #6 Foam::solidRegionDiffNo(Foam::fvMesh const&, Foam::Time const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) in "/root/OpenFOAM/root-1.6.x/applications/bin/linux64GccDPOpt/chtMultiRegionHeatSourceFoam" #7 main in "/root/OpenFOAM/root-1.6.x/applications/bin/linux64GccDPOpt/chtMultiRegionHeatSourceFoam" #8 __libc_start_main in "/lib/libc.so.6" #9 _start in "/root/OpenFOAM/root-1.6.x/applications/bin/linux64GccDPOpt/chtMultiRegionHeatSourceFoam" Floating point exception |
|
July 2, 2010, 07:12 |
|
#7 | |||
Member
Robertas N.
Join Date: Mar 2009
Location: Kaunas, Lithuania
Posts: 53
Rep Power: 17 |
Hi, Maddalena,
Quote:
to set up a case with only a solid region, so that there is no heat loss due to fluid flow; or, it seems, if you set the thermal conductivity (K) to 0, heat will not be transferred to fluid region. Quote:
Quote:
|
||||
July 2, 2010, 08:41 |
|
#8 | |||
Senior Member
maddalena
Join Date: Mar 2009
Posts: 436
Rep Power: 23 |
Hi Robertas,
Quote:
Quote:
Quote:
Cheers, mad |
||||
August 3, 2010, 12:28 |
|
#9 | |
Senior Member
maddalena
Join Date: Mar 2009
Posts: 436
Rep Power: 23 |
Quote:
sorry if I come back on the same point again, but I am getting hard time to have the chtMultiRegionFoam + heat source working. In particular, I have difficulties on obtaining a time vs temperature variation with the well known exponential behavior. In my simple case, I have a linear variation of it! Do you have ever experienced anything like that? If so, can you tell me what the problem was? You can find a more detailed explanation of my case on http://www.cfd-online.com/Forums/ope...egionfoam.html. Thank you of any suggestion you could give to me. regards, mad |
||
April 2, 2012, 12:51 |
|
#10 |
Senior Member
mahdi abdollahzadeh
Join Date: Mar 2011
Location: Covilha,Portugal
Posts: 153
Rep Power: 15 |
today i tried to test a case with chtMultiregionFoam.
my case includes natural convection in an enclosure with a block at the bottom. the bottom surface of block was heated. the strange thing is that the temperature is not passing throgh solid zone to fluid zone. I am using turbulentTemperatureCoupledBaffleMixed as the boundary condition on the interface of soid and liquid zone. I thinck there should be sth related to boundary condition. I will be too much thankful to recive you oponions . |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[OpenFOAM] Native ParaView Reader Bugs | tj22 | ParaView | 270 | January 4, 2016 12:39 |
vorticity boundary condition | bearcharge | Main CFD Forum | 0 | May 14, 2010 12:32 |
OF 1.6 | Ubuntu 9.10 (64bit) | GLIBCXX_3.4.11 not found | piprus | OpenFOAM Installation | 22 | February 25, 2010 14:43 |
[Netgen] Installation of Netgen in SuSE Linux 92 | edvardsenpriv | OpenFOAM Meshing & Mesh Conversion | 23 | January 16, 2009 07:12 |
Problems of Duns Codes! | Martin J | Main CFD Forum | 8 | August 15, 2003 00:19 |