conjugateHeatFoam + interFoam

 Register Blogs Members List Search Today's Posts Mark Forums Read

 March 23, 2012, 17:12 conjugateHeatFoam + interFoam #1 Member   Join Date: Nov 2009 Posts: 48 Rep Power: 8 Hello Guys, First I want to mention sth in this thread, This forum used to be more useful before, and Also the founder of OF used to be more responsible and helpful for the new users. I dont know why ?? If anybody know, let us know!!! I posted one problem regarding the solver conjugateHeatFoam several weeks ago, But no body answered my question, Since I could not find the answer, I am gonna ask it again. ( I tried so many other way to simulate the case...no luck) I am trying to create a solver based on conjugateHeatFoam. It is a transient solver for incompressible, laminar, two phase flow of non-isothermal, newtonian fluids with conjugate heat transfer. Here is my first first question: 1- Is it possible to couple the thermal conductivity instead of thermal diffusivity in conjugateHEatFoam??? my Energy equations for two phase and solid part are like this : *********** { // Decoupled patches # include "attachPatches.H" // Solid side # include "readSolidControls.H" volScalarField kappa = twoPhaseProperties.kappa(); surfaceScalarField kappaf = twoPhaseProperties.kappaf(); for (int nonOrth = 0; nonOrth <= nNonOrthCorr; nonOrth++) { coupledFvScalarMatrix TEqns(2); // Add fluid equation TEqns.set ( 0, new fvScalarMatrix ( fvm::ddt(rhoCp, T) + fvm::div(rhoPhiCp, T) - fvm::laplacian(kappaf, T) ) ); // Add solid equation TEqns.set ( 1, new fvScalarMatrix ( fvm::ddt(rhoS*cpS, Tsolid) - fvm::laplacian(kappaSolid, Tsolid) ) ); TEqns.solve(); } } ***************** and I add this two in my createSolidField.H***** kappa.correctBoundaryConditions(); kappaSolid.correctBoundaryConditions(); *************** Here is my B.Cs at the interface: ********* type regionCoupling; remoteField kappa; value uniform 0.0257; ************** And This is the Error when I run the solver on simple case: ********* ... Selecting turbulence model type laminar Reading field kappa Reading field Tsolid Reading solid thermal conductivity kappa --> FOAM FATAL ERROR: Attempt to cast type calculated to type regionCoupling From function refCast(From&) in file /home/farhangi/OpenFOAM/OpenFOAM-1.6-ext/src/OpenFOAM/lnInclude/typeInfo.H at line 115. FOAM aborting Aborted ******************* Thanks in advance for giving me comments, Mehran

March 26, 2012, 10:40
#2
Senior Member

Kent Wardle
Join Date: Mar 2009
Location: Illinois, USA
Posts: 207
Rep Power: 13
Unfortunately, I have little experience with conjugateHeatFoam myself and can offer only the small, and perhaps obvious, insight that it looks like a BC problem on your interface. Have you verified things are consistent in all your field files for the basic setup? Have you verified the setup works correctly with a standard solver before trying with your modified one?

I did want to comment on your first point.
Quote:
 First I want to mention sth in this thread, This forum used to be more useful before, and Also the founder of OF used to be more responsible and helpful for the new users. I dont know why ?? If anybody know, let us know!!!
Perhaps this is part of your answer. The developers are in the business of developing the software. That requires money. The model they have chosen is to offer the code for free and provide support under paid contract. Personally, I find this a very nice business model. If you want to use the code and figure it out on your own or attempt to get help from the 'community' represented on this site, you are free to do so. And while you are also free to complain about not getting help (though some may find it annoying and choose not to respond), you are also free to contact OpenCFD (or others offering competing services) about a paid support contract. Only then are you entitled to harass for help.

Quote:
 I posted one problem regarding the solver conjugateHeatFoam several weeks ago, But no body answered my question, Since I could not find the answer, I am gonna ask it again.
Have you considered that you may not have asked the right question or you may not have provided ample information for someone to give a useful response? Take a look at the suggestions here.

Good luck solving your problem. I certainly understand that it can be frustrating to have the tools at your tips and not be able to use them fully because of some crazy errors that aren't clear. I am sure there is someone out there who can help you. You can either ask nicely or pay them (or both).
Regards,
Kent

December 15, 2012, 06:05
Conjugate heat faom
#3
Member

Dinesh Balaji
Join Date: Oct 2012
Posts: 43
Rep Power: 5
Quote:
 Originally Posted by farhagim Hello Guys, First I want to mention sth in this thread, This forum used to be more useful before, and Also the founder of OF used to be more responsible and helpful for the new users. I dont know why ?? If anybody know, let us know!!! I am trying to create a solver based on conjugateHeatFoam. It is a transient solver for incompressible, laminar, two phase flow of non-isothermal, newtonian fluids with conjugate heat transfer. ******************* Thanks in advance for giving me comments, Mehran

Hi ,

I am also trying to use conjugate heat foam. Since I am very new I thought of proceeding with tutorial. Do you have any tutorial by default or you are modifying an already existing case?

 December 20, 2012, 06:08 Hello farhagim, #4 Senior Member   Tushar Chourushi Join Date: Jul 2009 Location: IIT-Indore, India Posts: 319 Blog Entries: 1 Rep Power: 10 it's seems your problem is in: " Reading solid thermal conductivity kappa --> FOAM FATAL ERROR: Attempt to cast type calculated to type regionCoupling " Do check again these files: " // Decoupled patches # include "attachPatches.H" // Solid side # include "readSolidControls.H" " Do, let us know about the same. __ Regards, Tushar

 September 12, 2013, 10:04 #5 Member   Join Date: May 2012 Posts: 55 Rep Power: 7 I want to push this topic. Is there any progress in combining conjugate heat transfer and interFoam?

September 25, 2013, 02:33
#6
Member

Join Date: Dec 2012
Posts: 36
Rep Power: 5
Quote:
 Originally Posted by styleworker I want to push this topic. Is there any progress in combining conjugate heat transfer and interFoam?
Hi styleworker
Do you found a way for combine conjugate heat transfer with interFoam?
i want simulate two phase flow with conjugate heat transfer....

 September 25, 2013, 03:18 #7 Member   Join Date: May 2012 Posts: 55 Rep Power: 7 I'm working on it. Right now I want to combine MRconjugateHeatFoam with interDyMFoam. It's actually quite easy to combine two-phase flow with conjugate heat transfer. I think the tricky part is the 3-phase contact line. Please correct me, if I'm wrong. As far as I know, the coupling in chtMultiRegionFoam (OF-2.2.x) and MRconjugateHeatFoam is explicitly at the boundaries. Equations for fields are solved in each region seperately. For fields existing in both regions coupling is solved iteratively. In particular MRconjugateHeatFoam is using a mixed Neumann-Dirichlet-BC with a convergence criteria. I don't know how chtMRF does the coupling, because I haven't checked it. I guess there is no convergence criteria, because both boundaries are set to a constant temperature. conjugateHeatFoam (OF-1.6-ext) should have an implicit coupling between solid and fluid. Field equations of each region are assembled in a single "global" matrix. check out this topics for more information: General: Cht tutorial in 15 chtMultiRegionFoam: chtMultiRegionFOAM (Heattransfer) Temperature boundary condition problem solidWallHeatFluxTemperature at the solid solid interface in chtMultiRegionSimpleFoam MRconjugateHeatFoam: Convective multi-region HT (MRconjugateHeatFoam) conjugateHeatFoam: conjugateHeatFoam solver included in OF 1.6-ext Last edited by styleworker; September 25, 2013 at 04:26.

September 25, 2013, 04:27
#8
Member

Join Date: Dec 2012
Posts: 36
Rep Power: 5
Quote:
 Originally Posted by styleworker I'm working on it. Right now I want to combine MRconjugateHeatFoam with interDyMFoam. It's actually quite easy to combine two-phase flow with conjugate heat transfer. I think the tricky part is the 3-phase contact line. Please correct me, if I'm wrong. As far as I know, the coupling in chtMultiRegionFoam (OF-2.2.x) and MRconjugateHeatFoam is explicitly at the boundaries. Equations for fields are solved in each region seperately. For fields existing in both regions coupling is solved iteratively. In particular MRconjugateHeatFoam is using a mixed Neumann-Dirichlet-BC with a convergence criteria. I don't know how chtMRF does the coupling, because I haven't checked it. conjugateHeatFoam (OF-1.6-ext) should have an implicit coupling between solid and fluid. Field equations of each region are assembled in a single "global" matrix. check out this topics for more information: General: Cht tutorial in 15 chtMultiRegionFoam: chtMultiRegionFOAM (Heattransfer) Temperature boundary condition problem solidWallHeatFluxTemperature at the solid solid interface in chtMultiRegionSimpleFoam MRconjugateHeatFoam: Convective multi-region HT (MRconjugateHeatFoam) conjugateHeatFoam: conjugateHeatFoam solver included in OF 1.6-ext
I dont know which way is better?I use interFoam solver for simulate evaporation model.(incompressible fluid) and modify that.but for my case,I should implemented conjugate heat transfer.and now,i dont know, i should add solid region in my solver or use chtMultiRegionFOAM as base and modify Fluid dictionary for two fluid with evaporation.
can you guide me?
Regards,

 September 25, 2013, 04:44 #9 Member   Join Date: May 2012 Posts: 55 Rep Power: 7 Check out the source code of chtMultiRegionFoam. You have to replace the fluid solving part.

 December 29, 2013, 03:52 #10 New Member   Nazanin Join Date: Sep 2013 Posts: 22 Rep Power: 4 Hello every body I want simulate conjugate heat transfer with interFoam solver.any body can help me,how start to modify interFoam solver for this problem,or any body can provide his solver for me?? Regards,

 May 19, 2014, 04:41 #11 Member   Al Join Date: Jul 2013 Location: Japan Posts: 40 Blog Entries: 3 Rep Power: 5 Hello, I was trying as styleworker suggested to replace the fluid solver part, more precisely to merge the createFields.H of compressibleInterFoam with the createFluidsFields.H of chtMultiRegionFoam. for more details see here: https://github.com/donQi/interChtMultiRegionFoam I am not an expert programmer so I just did same basic modifications like adding lines from createFields.H into createFluidsFields Code: ``` twoPhaseMixtureThermo twoPhaseProperties(fluidRegions[i]); volScalarField& alpha1(twoPhaseProperties.alpha1()); volScalarField& alpha2(twoPhaseProperties.alpha2());``` and subtituting "mesh" with "fluidRegions[i]" The compiling gives no error but when I launch the analysis I get an hanging pointer error (see below). I am a bit messy and I am aware that I should study C++ a little more, meanwhile if you notice some trivial error or have some advice to give me it will be more than welcome. Code: ```Create fluid mesh for region bottomWater for time = 0 Create fluid mesh for region topAir for time = 0 Create solid mesh for region heater for time = 0 Create solid mesh for region leftSolid for time = 0 Create solid mesh for region rightSolid for time = 0 *** Reading fluid mesh thermophysical properties for region bottomWater Adding to thermoFluid Selecting thermodynamics package { type heRhoThermo; mixture pureMixture; transport const; thermo hConst; equationOfState rhoConst; specie specie; energy sensibleEnthalpy; } Adding to UFluid Adding to phiFluid --> FOAM FATAL ERROR: hanging pointer of type N4Foam14GeometricFieldIdNS_12fvPatchFieldENS_7volMeshEEE at index 0 (size 2), cannot dereference From function PtrList::operator[] in file /opt/OpenFOAM-2.3.0/src/OpenFOAM/lnInclude/PtrListI.H at line 177.``` Last edited by donQi; May 22, 2014 at 01:11.

 August 14, 2014, 08:18 #12 New Member   Christoph Kratzsch Join Date: Nov 2011 Location: Freiberg Posts: 27 Rep Power: 6 Hello to everyone, currently, i have a similar "hanging pointer"-error by introducing a PointerList of a singlePhaseTransportModel in the createFluidFields.H file of the chtMultiRegionFoam solver. donQi, did you solved your problem and can you give me some hints? Best regards.

 October 30, 2014, 09:32 #13 New Member   Join Date: Mar 2014 Posts: 5 Rep Power: 4 Hey donQi, PonchO, I have exactly the same problem, when I trying to connect interFoam together with chtMultiRegionFoam. Did you found the solution ? I will be appreciate for some help. Best, PS

 October 30, 2014, 10:23 #14 New Member   Christoph Kratzsch Join Date: Nov 2011 Location: Freiberg Posts: 27 Rep Power: 6 Hi przesmak, i don't found a solution up to now. The solver development is temporarily laid ad acta. But in the near future i have do pursue the work on this solver. Maybe i find time for this at the beginning of next year. If you both found a solution, then feel free to post it ;-). Best regards and good speed. Christoph

 November 18, 2014, 05:07 #15 New Member   Join Date: Mar 2014 Posts: 5 Rep Power: 4 Hi, I think, I found the solution. Propabbly the biggest problem is to compile two different approach of the fluid flow (compressible in chtMultiRegion, and incompressible in interFoam). In my case I don't need to use a compressibility model, so I canceled the part of the solver related to compressibility in createFluidFields.H -> density in phiFluid. Code: ``` Info<< " Adding to phiFluid\n" << endl; phiFluid.set ( i, new surfaceScalarField ( IOobject ( "phi", runTime.timeName(), fluidRegions[i], IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE ), linearInterpolate(UFluid[i]) // delated rhoFluid[i]* & fluidRegions[i].Sf() ) );``` I hope this help. Best regards, przesmak

 July 19, 2016, 07:55 #16 New Member   elham usefi Join Date: Apr 2016 Location: tabriz,iran Posts: 6 Rep Power: 2 Hi everybody. I want to create a ChtMultiRegion solver for incompressible fluids...(cuz I'm gonna add the concentration equation to my solver) and I get similar error Code: ```Create time Create fluid mesh for region bottomWater for time = 0 Create fluid mesh for region topAir for time = 0 Create solid mesh for region heater for time = 0 Create solid mesh for region leftSolid for time = 0 Create solid mesh for region rightSolid for time = 0 *** Reading fluid mesh thermophysical properties for region bottomWater Reading transportProperties bottomWater Adding to UFluid Adding to CFluid Adding to rhoFluid Adding to RhoPhiiFluid Adding to TFluid Adding to cpFluid Adding to rhoCpFluid Adding to RhoPhiCpFluid Adding to k_nFluid Adding to muFluid Adding to betaFluid Adding to gFluid Adding to rhokFluid Adding to ghFluid Adding to ghfFluid Adding to pFluid Adding fvOptions No finite volume options present *** Reading fluid mesh thermophysical properties for region topAir Reading transportProperties topAir Adding to UFluid Adding to CFluid Adding to rhoFluid Adding to RhoPhiiFluid Adding to TFluid Adding to cpFluid Adding to rhoCpFluid Adding to RhoPhiCpFluid Adding to k_nFluid Adding to muFluid Adding to betaFluid Adding to gFluid Adding to rhokFluid Adding to ghFluid Adding to ghfFluid Adding to pFluid Adding fvOptions No finite volume options present *** Reading solid mesh thermophysical properties for region heater Adding to thermos Selecting thermodynamics package { type heSolidThermo; mixture pureMixture; transport constIso; thermo hConst; equationOfState rhoConst; specie specie; energy sensibleEnthalpy; } Adding fvOptions No finite volume options present *** Reading solid mesh thermophysical properties for region leftSolid Adding to thermos Selecting thermodynamics package { type heSolidThermo; mixture pureMixture; transport constIso; thermo hConst; equationOfState rhoConst; specie specie; energy sensibleEnthalpy; } Adding fvOptions No finite volume options present *** Reading solid mesh thermophysical properties for region rightSolid Adding to thermos Selecting thermodynamics package { type heSolidThermo; mixture pureMixture; transport constIso; thermo hConst; equationOfState rhoConst; specie specie; energy sensibleEnthalpy; } Adding fvOptions No finite volume options present Region: bottomWater Courant Number mean: 0.18178764 max: 0.87149531 Region: topAir Courant Number mean: 0.18222175 max: 0.87149531 Region: heater Diffusion Number mean: 2.7920228e-06 max: 3.3333334e-06 Region: leftSolid Diffusion Number mean: 2.7848101e-06 max: 3.3333334e-06 Region: rightSolid Diffusion Number mean: 2.7848101e-06 max: 3.3333334e-06 deltaT = 0.00068846816 Region: bottomWater Courant Number mean: 0.125155 max: 0.59999677 Region: topAir Courant Number mean: 0.12545388 max: 0.59999677 Region: heater Diffusion Number mean: 1.9222188e-06 max: 2.2948939e-06 Region: leftSolid Diffusion Number mean: 1.9172531e-06 max: 2.2948939e-06 Region: rightSolid Diffusion Number mean: 1.9172531e-06 max: 2.2948939e-06 deltaT = 0.00068846816 Time = 0.000688468 Solving for fluid region bottomWater --> FOAM FATAL ERROR: hanging pointer of type N4Foam14GeometricFieldIdNS_12fvPatchFieldENS_7volMeshEEE at index 0 (size 2), cannot dereference From function PtrList::operator[] in file /opt/openfoam240/src/OpenFOAM/lnInclude/PtrListI.H at line 177. FOAM aborting #0 Foam::error::printStack(Foam::Ostream&) at ??:? #1 Foam::error::abort() at ??:? #2 Foam::PtrList >::operator[](int) at ??:? #3 ? at ??:? #4 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6" #5 ? at ??:? Aborted (core dumped) elham@elham-Inspiron-N5110:~/OpenFOAM/elham-2.4.0/run/u3\$``` and I have no idea what should I do have u achieved any progress with this error? like przesmak said I have delete every compressible part I guess and my phi is like Code: ``` Info<< " Adding to phiFluid\n" << endl; phiFluid.set ( i, new surfaceScalarField ( IOobject ( "phi", runTime.timeName(), fluidRegions[i], IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE ), linearInterpolate(rhoFluid[i]*UFluid[i]) & fluidRegions[i].Sf() ) );```

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post francesco_b OpenFOAM Running, Solving & CFD 8 July 31, 2013 02:29 voingiappone OpenFOAM 16 November 2, 2011 07:49 Ralph M OpenFOAM Programming & Development 1 November 17, 2010 07:46 carsten OpenFOAM Bugs 6 September 23, 2009 09:46 sxhdhi OpenFOAM Running, Solving & CFD 3 May 5, 2009 21:58

All times are GMT -4. The time now is 13:23.