conjugateHeatFoam + interFoam
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 nonisothermal, 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<To>(From&) in file /home/farhangi/OpenFOAM/OpenFOAM1.6ext/src/OpenFOAM/lnInclude/typeInfo.H at line 115. FOAM aborting Aborted ******************* Thanks in advance for giving me comments, Mehran 
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:
As to your problem: Quote:
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 
Conjugate heat faom
Quote:
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? 
Hello farhagim,
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 
I want to push this topic. Is there any progress in combining conjugate heat transfer and interFoam?

Quote:
Do you found a way for combine conjugate heat transfer with interFoam? i want simulate two phase flow with conjugate heat transfer.... 
I'm working on it. Right now I want to combine MRconjugateHeatFoam with interDyMFoam. It's actually quite easy to combine twophase flow with conjugate heat transfer. I think the tricky part is the 3phase contact line.
Please correct me, if I'm wrong. As far as I know, the coupling in chtMultiRegionFoam (OF2.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 NeumannDirichletBC 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 (OF1.6ext) 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: http://www.cfdonline.com/Forums/ope...rial15a.html chtMultiRegionFoam: http://www.cfdonline.com/Forums/ope...egionfoam.html http://www.cfdonline.com/Forums/ope...nproblem.html http://www.cfdonline.com/Forums/ope...implefoam.html MRconjugateHeatFoam: http://www.cfdonline.com/Forums/ope...eheatfoam.html conjugateHeatFoam: http://www.cfdonline.com/Forums/ope...d16ext.html 
Quote:
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, 
Check out the source code of chtMultiRegionFoam. You have to replace the fluid solving part.

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, 
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]); 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 
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. 
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 
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 
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; Best regards, przesmak 
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 like przesmak said I have delete every compressible part I guess and my phi is like Code:
Info<< " Adding to phiFluid\n" << endl; 
All times are GMT 4. The time now is 17:32. 