
[Sponsors] 
December 23, 2013, 01:12 

#81 
New Member
thejaraju
Join Date: Dec 2010
Posts: 8
Rep Power: 6 
Yes i will surely try and reply you................
I hope it works well Please also find the visoelasticInterfoam solvers which i am attaching with the reply Thank you very much for the reply Regards Thejaraju.R 

December 23, 2013, 01:19 

#82  
New Member
thejaraju
Join Date: Dec 2010
Posts: 8
Rep Power: 6 
Quote:
Thankyou very much reply ......... I will definitely check this and come back to you 

April 7, 2014, 06:09 

#83 
New Member
Thilo Franke
Join Date: Mar 2014
Location: Bunswick
Posts: 4
Rep Power: 3 
Hi,
few questions about the InterTempFoamSolver:  For which OpenFoam Version the Solver is written?  Did anybody write a version for 2.2?  Does anybody have a test case for the solver he likes to share? and for my understanding:  why does the solver uses PISO instead of PIMPLE like the actual InterFoam? Thank you for answering Regards, Thilo 

April 8, 2014, 17:21 

#84 
Member
sajad
Join Date: Aug 2013
Posts: 64
Rep Power: 3 

April 8, 2014, 17:47 

#85 
Member
Ovie Doro
Join Date: Jul 2009
Posts: 99
Rep Power: 8 

April 9, 2014, 01:54 

#86  
Member
sajad
Join Date: Aug 2013
Posts: 64
Rep Power: 3 
Quote:
I wanna compile incomprissileTwoPhaseThermalMixture at frist but I cant do that. can you help me how can I compile that? my problem similar the Thread 53. this is my mail: sajad.khodadadi23@yahoo.com thanks a lot Sajad 

April 30, 2014, 05:24 

#87 
New Member
zhanglei
Join Date: May 2013
Location: China
Posts: 19
Rep Power: 4 
hi ovie，
I try to add the energy equation to my interFoam, which is used to simulate the polymer injection process. I have implemented the two mentioned energy equation, and both results are still undesirability. let me introduce my code: 1. d(rho*T)/dt + div(rho*V*T) = div((kappa/cp)*grad T) + source terms/cp In my code, this equation is written as: fvm::ddt(rho,T) +fvm::div(rhoPhi,T)fvm::laplacian((kappa/Cp),T)==(mu/Cp)*magSqr(fvc::grad(U)) 1) rho and rhoPhi is created in the createFields.H just like the source code, and surfaceScalarField rhoPhi is updated after the alphaEqn.H 2) Kappa is the mixture value of the two phase(liquid, Kappa1 [1 1 3 1 0 0 0 ] 0.18/air kappa2 [1 1 3 1 0 0 0 ] 0.03), volScalarField kappa=alpha1*kappa1+alpha2*kappa2. 3) Cp is also the mixture value, and Cp1 [0 2 2 1 0 0 0 ] 3100/Cp2 [0 2 2 1 0 0 0 ] 1000. volScalarField Cp=alpha1*Cp1+alpha2*Cp2. 4) volScalarField mu = twoPhaseProperties.mu() In my case, the inlet temperature is 513K(fixedvalue), and the wall is 323K(fixedvalue). I choose Gauss upwind for div(rhoPhi,T), and Gauss linear corrected for laplacianSchemes. The result shows that the max temperature is about 900K at the first step near the interface, and it reduces to the normal value 513K after 1/3 computation time. What’s more, I also change the kappa/Cp in the energy diffusion term from volScalarField to surfaceScalarField by interpolate(Kappa) and interpolate(Cp), and the result has no change. 2. d(rho*cp*T)/dt + div(cp*T*rho*V) = div(kappa*grad T) + source terms In my code, this equation is written as: fvm::ddt(rhoCp,T) +fvm::div(rhoPhiCp,T)fvm::laplacian(kappa,T)==mu*magSqr(fvc::grad(U)) 1) volScalarField rhoCp and surfaceScalarField rhoPhiCp is created like your code. rhoCp is updated after rho in the alphaEqnSubCycle.H by rhoCp = alpha1*rho1*cp1 + alpha2*rho2*cp2, rhoPhiCp is updated after rhoPhi in the alphaEqn.H by rhoPhiCp = phiAlpha*(rho1*cp1  rho2*cp2) + phi*rho2*cp2. 2) kappa and mu is also the mixture value like the equation 1. In my case, I choose Gauss upwind for div(rhoPhiCp,T), and other set is same as the first case above. The result shows that the max temperature is about 3000K at the first step on the front of interface(in the air area), and it Increase to inf. after about 1/4 computation time. After run the two different equations, the first one shows better convergence ability, but my code still cannot get a satisfactory result. I think the wide difference of properties of the too phases not only blows up the convective term but also blows up my head!!! Can you help me with error correction or improvement suggestions? Thanks in advance! 

May 3, 2014, 00:56 
add TEqn.H

#88 
New Member
zhanglei
Join Date: May 2013
Location: China
Posts: 19
Rep Power: 4 
@ovie
A quite simple question:In your code, you add the TEqn.H after UEqn.H. Why not after the PISO loop just like the tutorial( "How to add temperature to icoFoam")? 

May 3, 2014, 05:02 

#89 
Member
sajad
Join Date: Aug 2013
Posts: 64
Rep Power: 3 
Dear Becklei because interFoam used the pimple loop and its different with piso, and for added TEqn you can't do that similar add TEeqn into icoFoam. you must do that for two phase at the same time.


May 3, 2014, 05:29 

#90  
New Member
zhanglei
Join Date: May 2013
Location: China
Posts: 19
Rep Power: 4 
Quote:
Thanks for your reply! I will try to understand the PIMPLE loop by myself. Can you give me some detail explain about the difference between TEqn and TEeqn? Thanks again for your patience to the novice! 

July 11, 2014, 09:01 

#91 
Member
sajad
Join Date: Aug 2013
Posts: 64
Rep Power: 3 
dear foamer,
I know this post write for many time ago,but I face to this problem right now, I wanna simulation rising bubble with temp, following this boundary conditions: upper wall 312k and else is zeroGradient and my box have 298k. after few iteration bubble temp be 400k or more and temp unbunded. can you help me plz? how can I solve this problem? I added energy equation to interFoam following example in this trend,do you have any suggestion for solve this probplem. Best regards, Sajad 

August 29, 2014, 09:38 

#92 
New Member
Peter
Join Date: Apr 2014
Posts: 21
Rep Power: 3 
Hi Foamers,
I found some great tutorial slides for the implementation of heat transfer to interFoam in Openfoam version 2.3.0: http://www.wolfdynamics.com/images/conf_and_publ/interTempFoam.pdf the source code is published as well: http://www.wolfdynamics.com/images/conf_and_publ/source_interTempFoam.tar.gz Thanks to Damiano Natali and wolf dynamics !!! The implementation, compiling and running work well, but my results show some strange behavior: The initial temperature field involves values between 0 K and 300 K. After some steps, however, the temperature range is from around 30 K to 340 K. The negative values can be found near high temperature gradients. In the end of the simulation, the temperature is between 1 K and 20 K. I tried the following without really changing anything: 1. The procedure described in Ovie’s post: http://www.cfdonline.com/Forums/openfoamsolving/69103divergingresulttemperaturefieldinterfoam2.html#post264901 (thanks!) 2. Changing the temperature range to 1K to 300K 3. Reducing and increasing the specific heat 4. Reducing and increasing the density 5. Reducing the solver tolerances in fvSolution 6. Mesh refinement 7. Reducing maxCo, maxAlphaCo and maxDeltaT in the controlDict. (While compiling the solver, I got the warning that maxDeltaT is an unused variable) When I … … set up the case in a way, that no convection, only diffusion occurs, then temperature stays bounded. … reduce the initial temperature range to (0 K to 20 K) the “over swing” (how is this called in English?) reduces to +2K. … reduce the Prandtl number, which is used to calculate the heat conductivity, the temperature equalization in the domain is very quick, hence the gradient is reduced very fast and the “over swing” is reduced. What else can I do in order to bound the temperature of my simulation? Thank you in advance! 

September 1, 2014, 10:51 

#93  
New Member
Damiano Natali
Join Date: Mar 2013
Location: Genova, Italy
Posts: 15
Rep Power: 4 
Hi Peter,
Quote:
Maybe there are some other ways to bound your values, but this problem can be solved by using another scheme for computing div(rhoCpPhi,T). For example look in attachment what happens to min/max values of T by changing div(rhoCpPhi,T) from Gauss linearUpwind grad(T) to Gauss limitedLinear 1. There are a lot of possible schemes in OF, have a look for instance here! Best regards, Damiano Last edited by rama13; September 1, 2014 at 10:58. Reason: misspell 

March 25, 2015, 11:20 

#94 
Member
ali alkebsi
Join Date: Jan 2012
Location: Strasbourg, France
Posts: 72
Rep Power: 5 
Dear Foamers,
I have been suffering for two days with this same thing. I added the energy equation as developed by Ovie making some changes to adapt with OF2.3.0, but it didn't work and just today i saw the work done by wolfdynamics well! it is like a copy of my work ( or mine a copy of theirs) exactly, with some points missing in the slide provided, like adding the line tmp<surfaceScalarField> kappaf() const; in the incompressibleTwoPhaseMixture.H file So, more presicely, what iv done is i added Foam::tmp<Foam::surfaceScalarField> Foam::incompressibleTwoPhaseMixture::kappaf() const { const surfaceScalarField alpha1f ( min(max(fvc::interpolate(alpha1_), scalar(0)), scalar(1)) ); return tmp<surfaceScalarField> ( new surfaceScalarField ( "kappaf", ( alpha1f*rho1_*cp1_*(1/Pr1_)*fvc::interpolate(nuModel1_>nu()) + (scalar(1)  alpha1f)*rho2_*cp2_*(1/Pr2_)*fvc::interpolate(nuModel2_>nu()) ) ) ); } to incompressibleTwoPhaseMixture.C file and added cps and Prs in .H file and tmp..... like defined above and the library is compiled perfectly in my solver i added the TEqn where the 1st line is surfaceScalarField kappaf = twoPhaseProperties.kappaf(); but when i compile my solver it gives my the following massage: /home/alkebsi/OpenFOAM/alkebsi2.3.0/applications/solvers/interThermalFoam/TEqn.H:1: référence indéfinie vers « Foam::incompressibleTwoPhaseMixture::kappaf() const » collect2: error: ld returned 1 exit status make: *** [/home/alkebsi/OpenFOAM/alkebsi2.3.0/platforms/linux64GccDPOpt/bin/interThermalFoam] Erreur 1 the system is french but i think it is clear what (référence indéfinie vers) means (undefined reference) well! stupidly i tried to comment the part in .C file where the method kappaf() is defined, recombiled the library successfully and when i combile the solver it shows the same error. As if he cant access it wether it is there or not 

March 26, 2015, 04:54 

#95 
Member
ali alkebsi
Join Date: Jan 2012
Location: Strasbourg, France
Posts: 72
Rep Power: 5 
sorry
found my stupid mistake I did not specify the new library in make/options and the solver was looking for the method kappaf() in the original library now it is working thanks for passing by 

June 30, 2015, 14:45 

#96 
New Member
Manuel do Nascimento
Join Date: May 2012
Posts: 7
Rep Power: 5 
Hello. I have a question about adding the temperature to the interFoam solver with the methods discussed in this thread.
Where exactly are the condition of heat flux continuity of the interface implemented? Can I see those directly in the code? Something like k1*dT1/dn = k2*dT2/dn. Thanks 

June 30, 2015, 15:06 

#97 
Member
ali alkebsi
Join Date: Jan 2012
Location: Strasbourg, France
Posts: 72
Rep Power: 5 
Dear Manuel
in VOF method there is no T1 and T2 there is only T of the effective fluid. I get your point, sperious or parasite fluxes could start from one fluid to the other through the interface, and something like the compression term in the alpha equation should be added. the solver discussed here however gives good results, with the use of vanleer scheme for the flux term. 

June 30, 2015, 15:21 

#98  
New Member
Manuel do Nascimento
Join Date: May 2012
Posts: 7
Rep Power: 5 
Quote:
you are right, there is no specific T for each phase in this solver. I should have known this ... But still, is the condition fullfilled somehow, somewhere? I could ask the same for the shear stresses of both phases at the interface. 

July 31, 2015, 15:33 

#99 
New Member
Behzad
Join Date: Nov 2014
Posts: 7
Rep Power: 2 
Hi all,
I have followed the similar steps as given in this post by Ovie to add energy equation to interFoam.I use openFOAM2.3. first I compiled new library in src/incompressible/incompressibleTwoPhaseMixture without any error. after that I wanted to implement new solver. But this error occured: /home/beh/OpenFOAM/OpenFOAM2.3.0/src/finiteVolume/lnInclude/fvmLaplacian.C:322:1: note: template argument deduction/substitution failed: In file included from myinterFoam.C:97:0: TEqn.H:6:30: note: ‘Foam::surfaceScalarField {aka Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh>}’ is not derived from ‘const Foam::tmp<Foam::GeometricField<GType, Foam::fvsPatchField, Foam::surfaceMesh> >’  fvm::laplacian(kappaf, T) ^ In file included from myinterFoam.C:62:0: /home/beh/OpenFOAM/OpenFOAM2.3.0/src/finiteVolume/lnInclude/readTimeControls.H:38:8: warning: unused variable ‘maxDeltaT’ [Wunusedvariable] scalar maxDeltaT = ^ make: *** [Make/linux64GccDPOpt/myinterFoam.o] Error 1 I would be thankful if you help me 

Tags 
interfoam energy, temperature field 
Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Moving mesh  Niklas Wikstrom (Wikstrom)  OpenFOAM Running, Solving & CFD  122  June 15, 2014 06:20 
Getting a concentration field around a bubble in InterFoam  azman  OpenFOAM Running, Solving & CFD  2  January 7, 2013 14:47 
Adding temperature field to InterFoam  yapalparvi  OpenFOAM Running, Solving & CFD  8  October 14, 2009 20:18 
Problem with rhoSimpleFoam  matteo_gautero  OpenFOAM Running, Solving & CFD  0  February 28, 2008 07:51 
Problems calculating field gh with interFoam  cricke  OpenFOAM Running, Solving & CFD  0  December 10, 2007 08:17 