|
[Sponsors] |
Diverging result for Temperature field in interFoam |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
October 5, 2010, 12:59 |
|
#41 |
Member
Join Date: Nov 2009
Posts: 48
Rep Power: 17 |
Hello Ovie,
Thanks for sharing your information. I tried to compile your interTempFoam code and incomprissileTwoPhaseThermalMixture file, I got this error during compiling the main code. Would you please tell me what is the problem? Making dependency list for source file interTempFoam.C SOURCE=interTempFoam.C ; g++ -m32 -Dlinux -DWM_DP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-40 -I./transportModels -I./transportModels/incompressible/lnInclude -I./transportModels/interfaceProperties/lnInclude -I/home/mehran/OpenFOAM/OpenFOAM-1.6/src/turbulenceModels/incompressible/turbulenceModel -I/home/mehran/OpenFOAM/OpenFOAM-1.6/src/finiteVolume/lnInclude -IlnInclude -I. -I/home/mehran/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude -I/home/mehran/OpenFOAM/OpenFOAM-1.6/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linuxGccDPOpt/interTempFoam.o /home/mehran/OpenFOAM/OpenFOAM-1.6/src/finiteVolume/lnInclude/readPISOControls.H: In function ‘int main(int, char**)’: /home/mehran/OpenFOAM/OpenFOAM-1.6/src/finiteVolume/lnInclude/readPISOControls.H:11: warning: unused variable ‘transonic’ /home/mehran/OpenFOAM/OpenFOAM-1.6/src/finiteVolume/lnInclude/readPISOControls.H:14: warning: unused variable ‘nOuterCorr’ /home/mehran/OpenFOAM/OpenFOAM-1.6/src/finiteVolume/lnInclude/readPISOControls.H:3: warning: unused variable ‘nCorr’ /home/mehran/OpenFOAM/OpenFOAM-1.6/src/finiteVolume/lnInclude/readPISOControls.H:8: warning: unused variable ‘momentumPredictor’ /home/mehran/OpenFOAM/OpenFOAM-1.6/src/finiteVolume/lnInclude/readPISOControls.H:11: warning: unused variable ‘transonic’ /home/mehran/OpenFOAM/OpenFOAM-1.6/src/finiteVolume/lnInclude/readPISOControls.H:14: warning: unused variable ‘nOuterCorr’ g++ -m32 -Dlinux -DWM_DP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-40 -I./transportModels -I./transportModels/incompressible/lnInclude -I./transportModels/interfaceProperties/lnInclude -I/home/mehran/OpenFOAM/OpenFOAM-1.6/src/turbulenceModels/incompressible/turbulenceModel -I/home/mehran/OpenFOAM/OpenFOAM-1.6/src/finiteVolume/lnInclude -IlnInclude -I. -I/home/mehran/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude -I/home/mehran/OpenFOAM/OpenFOAM-1.6/src/OSspecific/POSIX/lnInclude -fPIC Make/linuxGccDPOpt/interTempFoam.o -L/home/mehran/OpenFOAM/OpenFOAM-1.6/lib/linuxGccDPOpt \ -L/home/mehran/OpenFOAM/mehran-1.6/lib/linuxGccDPOpt -linterfaceProperties -lincompressibleTransportModels -lincompressibleRASModels -lincompressibleLESModels -lfiniteVolume -lOpenFOAM -liberty -ldl -lm -o /home/mehran/OpenFOAM/mehran-1.6/applications/bin/linuxGccDPOpt/interTempFoam Make/linuxGccDPOpt/interTempFoam.o: In function `main': interTempFoam.C.text+0x4930): undefined reference to `Foam::twoPhaseMixture::kappaf() const' collect2: ld returned 1 exit status make: *** [/home/mehran/OpenFOAM/mehran-1.6/applications/bin/linuxGccDPOpt/interTempFoam] Error 1 Thanks, MEhran QUOTE=ovie;264901]Hi Metro, Like I said in an earlier reply, if the instability you speak of is at the interfacial region then its almost a consequence of the sharp jump in material properties at the interface. In other words, if the difference in specific heat (cp) between the two fluids is significant then grid resolution might not solve the problem. Besides, since cp is such a huge value compared to the other fluid properties, it only serves to blow up the convective term in the discretized governing equation relative to the other terms. So the instability is persistent. However, you may modify the equations if certain conditions apply: if the specific heat of the fluids is not dependent on temperature or still weakly dependent or if the temperature differences within the flow (eg between the heated or cooled wall and the incoming fluid) is not "large" (note that you would have to evaluate the fluid properties at the mean temperature), you can move cp from the convective term to the diffusive term so that the governing equation to solve is d(rho*T)/dt + div(rho*V*T) = div((kappa/cp)*grad T) + source terms/cp This is a more stable problem. For your TEqn.H, you can do: volScalarField kappa = twoPhaseProperties.kappa(); volScalarField Cp = alpha1*cp1 + (scalar(1) - alpha1)*cp2; fvScalarMatrix TEqn ( fvm::ddt(rho, T) + fvm::div(rhoPhi, T) - fvm::laplacian((kappa/Cp), T) ); TEqn.solve(); rho and rhoPhi already come from alphaEqnSubCycle.H and alphaEqn.H respectively. In this case, you would no longer require rhoCp and rhoPhiCp. Hope this helps.[/QUOTE] |
|
October 5, 2010, 14:21 |
|
#42 |
Member
Ovie Doro
Join Date: Jul 2009
Posts: 99
Rep Power: 17 |
Hi Faraghim,
Please check in your incompressibleTwoPhaseThemalMixture file if the function `Foam::twoPhaseMixture::kappaf() const' actually exits. And then check in your temperature equation in interTempFoam to see how you calculate the mixture thermal conductivity. Looks like there is some mix up somewhere in between. Thanks |
|
October 5, 2010, 22:23 |
|
#43 | |
Member
Join Date: Nov 2009
Posts: 48
Rep Power: 17 |
Hello,
I checked the incompressibleTwoPhaseThemalMixture file. the Foam::twoPhaseThermalMixture::kappaf() const exists there. and I also check the TEqn.H: surfaceScalarField kappaf = twoPhaseProperties.kappaf(); fvScalarMatrix TEqn ( fvm::ddt(rhoCp, T) + fvm::div(rhoPhiCp, T) - fvm::laplacian(kappaf, T) ); TEqn.solve(); everything looks fine, but I dont know what is the problem. I am just using your uploaded file in this thread. would mind take look at the file.?? Thanks, Mehran Quote:
|
||
October 5, 2010, 22:51 |
|
#44 |
Member
Ovie Doro
Join Date: Jul 2009
Posts: 99
Rep Power: 17 |
Which of the files did you compile first? You have to compile the incompressibleTwoPhaseThermalMixture file first before the interTempFoam solver. I have looked through and really cant find any differences between what I have here and what is on the thread.
Please let me know if you still have any problems. Thanks. |
|
October 6, 2010, 12:54 |
|
#45 | |
Member
Join Date: Nov 2009
Posts: 48
Rep Power: 17 |
Hello,
Thanks for your answer. I compiled the incompressibleTwoPhaseThermalMixture file without a problem , then I compile interTempFoam solver. and I got this error: Making dependency list for source file interTempFoam.C SOURCE=interTempFoam.C ; g++ -m32 -Dlinux -DWM_DP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-40 -I./transportModels -I./transportModels/incompressible/lnInclude -I./transportModels/interfaceProperties/lnInclude -I/home/mehran/OpenFOAM/OpenFOAM-1.6/src/turbulenceModels/incompressible/turbulenceModel -I/home/mehran/OpenFOAM/OpenFOAM-1.6/src/finiteVolume/lnInclude -IlnInclude -I. -I/home/mehran/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude -I/home/mehran/OpenFOAM/OpenFOAM-1.6/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linuxGccDPOpt/interTempFoam.o /home/mehran/OpenFOAM/OpenFOAM-1.6/src/finiteVolume/lnInclude/readPISOControls.H: In function ‘int main(int, char**)’: /home/mehran/OpenFOAM/OpenFOAM-1.6/src/finiteVolume/lnInclude/readPISOControls.H:11: warning: unused variable ‘transonic’ /home/mehran/OpenFOAM/OpenFOAM-1.6/src/finiteVolume/lnInclude/readPISOControls.H:14: warning: unused variable ‘nOuterCorr’ /home/mehran/OpenFOAM/OpenFOAM-1.6/src/finiteVolume/lnInclude/readPISOControls.H:3: warning: unused variable ‘nCorr’ /home/mehran/OpenFOAM/OpenFOAM-1.6/src/finiteVolume/lnInclude/readPISOControls.H:8: warning: unused variable ‘momentumPredictor’ /home/mehran/OpenFOAM/OpenFOAM-1.6/src/finiteVolume/lnInclude/readPISOControls.H:11: warning: unused variable ‘transonic’ /home/mehran/OpenFOAM/OpenFOAM-1.6/src/finiteVolume/lnInclude/readPISOControls.H:14: warning: unused variable ‘nOuterCorr’ g++ -m32 -Dlinux -DWM_DP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-40 -I./transportModels -I./transportModels/incompressible/lnInclude -I./transportModels/interfaceProperties/lnInclude -I/home/mehran/OpenFOAM/OpenFOAM-1.6/src/turbulenceModels/incompressible/turbulenceModel -I/home/mehran/OpenFOAM/OpenFOAM-1.6/src/finiteVolume/lnInclude -IlnInclude -I. -I/home/mehran/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude -I/home/mehran/OpenFOAM/OpenFOAM-1.6/src/OSspecific/POSIX/lnInclude -fPIC Make/linuxGccDPOpt/interTempFoam.o -L/home/mehran/OpenFOAM/OpenFOAM-1.6/lib/linuxGccDPOpt \ -L/home/mehran/OpenFOAM/mehran-1.6/lib/linuxGccDPOpt -linterfaceProperties -lincompressibleTransportModels -lincompressibleRASModels -lincompressibleLESModels -lfiniteVolume -lOpenFOAM -liberty -ldl -lm -o /home/mehran/OpenFOAM/mehran-1.6/applications/bin/linuxGccDPOpt/interTempFoam Make/linuxGccDPOpt/interTempFoam.o: In function `main': interTempFoam.C.text+0xf68): undefined reference to `Foam::twoPhaseThermalMixture::twoPhaseThermalMixt ure(Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::word const&)' interTempFoam.C.text+0x2d16): undefined reference to `Foam::twoPhaseThermalMixture::calcKappa()' interTempFoam.C.text+0x4940): undefined reference to `Foam::twoPhaseThermalMixture::kappaf() const' Make/linuxGccDPOpt/interTempFoam.o: In function `Foam::twoPhaseThermalMixture::~twoPhaseThermalMix ture()': interTempFoam.C.text._ZN4Foam22twoPhaseThermalMi xtureD1Ev[Foam::twoPhaseThermalMixture::~twoPhaseThermalMixt ure()]+0x19): undefined reference to `vtable for Foam::twoPhaseThermalMixture' collect2: ld returned 1 exit status make: *** [/home/mehran/OpenFOAM/mehran-1.6/applications/bin/linuxGccDPOpt/interTempFoam] Error 1 any idea what might be the problem? I can send you the whole file, if you give me your email address. Thanks, Mehran Quote:
|
||
October 6, 2010, 13:16 |
|
#46 |
Member
Ovie Doro
Join Date: Jul 2009
Posts: 99
Rep Power: 17 |
hi farhagim,
I can see that the constructor and a number of the functions in the incompressibleTwoPhaseThermalMixturec class are reported in the error log. Perharps the new class is not included in the new solver. In any case email me at oviefowe@yahoo.co.uk. Hopefully we can fix this. Thanks |
|
October 6, 2010, 13:23 |
|
#47 | |
Member
Join Date: Nov 2009
Posts: 48
Rep Power: 17 |
I can not send anything to this email address. it was rejected by the recipient domain. Do you have another Email address?
Quote:
|
||
October 6, 2010, 13:29 |
|
#48 |
Member
Ovie Doro
Join Date: Jul 2009
Posts: 99
Rep Power: 17 |
Please send me your email.
|
|
October 6, 2010, 13:34 |
|
#49 |
Member
Join Date: Nov 2009
Posts: 48
Rep Power: 17 |
||
October 23, 2010, 05:16 |
|
#50 | |
New Member
NieYongguang
Join Date: Sep 2010
Posts: 27
Rep Power: 16 |
Quote:
|
||
October 23, 2010, 11:47 |
|
#51 | |
Member
Ovie Doro
Join Date: Jul 2009
Posts: 99
Rep Power: 17 |
Quote:
|
||
October 25, 2010, 06:00 |
|
#52 | |
New Member
NieYongguang
Join Date: Sep 2010
Posts: 27
Rep Power: 16 |
Hello! ovie. I'm a new foamer. I download the code you shared and put all of them into same folder. Consequently, when I wmake them, the same error information mentioned by farhagim appeared.
Quote:
You have written above that You have to compile the incompressibleTwoPhaseThermalMixture file first before the interTempFoam solver. I doesn't understand because of lack of program experience in linux. How should I compile the incompressibleTwoPhaseThermalMixture file first. |
||
October 25, 2010, 11:37 |
|
#53 | |
Member
Ovie Doro
Join Date: Jul 2009
Posts: 99
Rep Power: 17 |
Quote:
good luck! |
||
October 25, 2010, 11:44 |
|
#54 | |
New Member
NieYongguang
Join Date: Sep 2010
Posts: 27
Rep Power: 16 |
Quote:
|
||
October 25, 2010, 11:51 |
|
#55 | |
Member
Ovie Doro
Join Date: Jul 2009
Posts: 99
Rep Power: 17 |
Quote:
Good luck.. |
||
October 30, 2010, 10:44 |
|
#56 |
New Member
NieYongguang
Join Date: Sep 2010
Posts: 27
Rep Power: 16 |
Thank you! ovie, I have received the email. According to the instruction in your email, I have successfully compiled the code.
|
|
October 30, 2010, 11:55 |
|
#57 | |
Member
Ovie Doro
Join Date: Jul 2009
Posts: 99
Rep Power: 17 |
Quote:
|
||
November 9, 2010, 11:15 |
|
#58 |
New Member
Alicja M
Join Date: Mar 2009
Location: Erlangen, DE
Posts: 26
Rep Power: 17 |
Hello,
i tried out a similar implementation and also Ovie's implementation of 'temperature equation' with interFoam. I have simulated a test case, cavity with two phases and also with one phase (modified dam break). With one phase it seems to work fine, with both phases it crashes. I tried it also with harmonic interpolation and it didn't helped. Any idea? Similar problems? Greetings, Alicja |
|
November 30, 2010, 14:51 |
interTempFoam for 2 components
|
#59 |
New Member
Join Date: Sep 2010
Posts: 1
Rep Power: 0 |
Hey,
I have the same problems as Alicja. When there is a big difference in the phase-properties of the 2 fluids my simulation crashs. I also tried it with the dam-break tutorial. Does anyone has a solution for this or rather has a solver which works for this problem? What do I have to change? Thanks, Sascha |
|
December 6, 2010, 11:50 |
|
#60 |
New Member
Alicja M
Join Date: Mar 2009
Location: Erlangen, DE
Posts: 26
Rep Power: 17 |
Hey,
maybe it is a bug? I have tried a 1D problem out (heat diffussion). I have calculated it with OpenFoam and Matlab (my similar code). i have got similar matrices, but solutions are different. I have also a big difference in the phase-properties of the 2 fluid. I have builded in an oscillation of the interface between both phases. I 've plottetd T vs x position in mesh |
|
Tags |
interfoam energy, temperature field |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Getting a concentration field around a bubble in InterFoam | azman | OpenFOAM Running, Solving & CFD | 3 | June 7, 2022 05:21 |
Moving mesh | Niklas Wikstrom (Wikstrom) | OpenFOAM Running, Solving & CFD | 122 | June 15, 2014 07:20 |
Adding temperature field to InterFoam | yapalparvi | OpenFOAM Running, Solving & CFD | 8 | October 14, 2009 21: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 |