CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   Phase Change Heat Conduction (http://www.cfd-online.com/Forums/openfoam/87187-phase-change-heat-conduction.html)

hawkeye321 April 13, 2011 10:47

Phase Change Heat Conduction
 
Hi all

I am a new user of OPEN FOAM and I want to model a "Phase Change Heat Conduction Problem" with it.

Would you please let me know if there is a tutorial for phase change heat conduction simulation with OPEN FOAM? There are some tutorials for OPENFOAM on the web but most of them are related to flow problems and not the problem that I want to model!

Regards!

fabian_roesler April 14, 2011 09:07

Phase Change in OF
 
Hi mahdiiowa

there is no solver in OF like you describe it. You will have to code it by yourself. The solver which just handles scalar transport is the scalarTransportFoam http://openfoamwiki.net/index.php/ScalarTransportFoam. There you have to delete the convective term and add a source term for the enthalpy jump during the phase change. There is much literature around describing the enthalpy method.

Regards

Fabian

hawkeye321 April 16, 2011 14:29

Dear Fabian
Thanks for you reply!

hawkeye321 April 16, 2011 15:14

Hi
I am now trying to modify scalarTransportFOAM solver! But I cannot where the source file for this solver is!
My directory

Home/OpenFOAM/magma-1.7.1/Run/tutorials/basic/scalarTransportFOAM/pitzDaily

Just contains files

0 constant system
!
I would be so thankful if someone lets me know how I can find the main solver for scalarTransportFOAM!

hawkeye321 April 16, 2011 15:48

Hi
I am now trying to modify scalarTransportFOAM solver! But I cannot where the source file for this solver is!
My directory

Home/OpenFOAM/magma-1.7.1/Run/tutorials/basic/scalarTransportFOAM/pitzDaily

Just contains files

0 constant system
!
I would be so thankful if someone lets me know how I can find the main solver for scalarTransportFOAM!

braennstroem April 17, 2011 04:12

1 Attachment(s)
Hello,

the attached solver does something similar, I hope it helps... it is based on Zaki Saldi's work. There is a validation case of Solomon's master thesis (I think... it's a long time ago).
Best Regards!
Fabian

hawkeye321 April 18, 2011 14:18

Dear Braennstroem
Thank you very much for the file and your kind considerations!

hawkeye321 April 18, 2011 15:16

Dear Braennstroem
Thank you again for the file! I tried to run it in a similar way to running icoFoam!
I set the current directory to
magma@r-soll34:~/OpenFOAM/magma-1.7.1/run/TestMahdi/meltFoam/testCase>
I run the blockMesh!
But when I want to run the meltFoam by typing meltFoam I get the following error

If 'meltFoam' is not a typo you can use command-not-found to lookup the package that contains it, like this:
cnf meltFoam
!
Would you please help me how to resolve this error!
Regards!

hossein.mashhadi April 19, 2011 09:36

Dear Mahdi

i think you have not compiled the solver MeltFoam so first do it and after that you can create a case like IcoFoam tutorial and run MeltFoam.

hope it help you.

hawkeye321 April 26, 2011 17:31

Dear Hossein
I want to compile pisoFoam.C, butI get the following error

%%%%%
mkdir: cannot create directory `linux64GccDPOpt': Permission denied
/bin/sh: linux64GccDPOpt/options: No such file or directory
make: *** [linux64GccDPOpt/options] Error 1
/opt/openfoam171/wmake/MakefileFiles:39: linux64GccDPOpt/options: No such file or directory
make: *** No rule to make target `linux64GccDPOpt/options'. Stop.
wmake error: file 'Make/linux64GccDPOpt/objectFiles' could not be created
%%%%%%
Would you please help me hove to fix it?

Regards

hossein.mashhadi April 27, 2011 00:25

Quote:

Originally Posted by mahdiiowa (Post 305175)
Dear Hossein
I want to compile pisoFoam.C, butI get the following error

%%%%%
mkdir: cannot create directory `linux64GccDPOpt': Permission denied
/bin/sh: linux64GccDPOpt/options: No such file or directory
make: *** [linux64GccDPOpt/options] Error 1
/opt/openfoam171/wmake/MakefileFiles:39: linux64GccDPOpt/options: No such file or directory
make: *** No rule to make target `linux64GccDPOpt/options'. Stop.
wmake error: file 'Make/linux64GccDPOpt/objectFiles' could not be created
%%%%%%
Would you please help me hove to fix it?

Regards

Hi Mahdi

i think you should log in as root user (by sudo bash command you can do it) or in file "file" in Make folder change the directory to "FOAM_USER_APPBIN".

i hope it works.

hawkeye321 April 28, 2011 14:35

Dear Hossein
Thank you very much for your help!
I logged in as a root user but now I have another problem even in compiling pisoFoam,(standard solver in Users Guide, Page 70)! the error is this
%%%%%%%%%%%%%%%%%%%
g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-40 -I/opt/openfoam171/src/turbulenceModels/incompressible/turbulenceModel -I/opt/openfoam171/src/transportModels -I/opt/openfoam171/src/transportModels/incompressible/singlePhaseTransportModel -I/opt/openfoam171/src/finiteVolume/lnInclude -IlnInclude -I. -I/opt/openfoam171/src/OpenFOAM/lnInclude -I/opt/openfoam171/src/OSspecific/POSIX/lnInclude -fPIC -Xlinker --add-needed Make/linux64GccDPOpt/pisoFoam.o -L/opt/openfoam171/lib/linux64GccDPOpt \
-lincompressibleTurbulenceModel -lincompressibleRASModels -lincompressibleLESModels -lincompressibleTransportModels -lfiniteVolume -lmeshTools -lOpenFOAM -liberty -ldl -lm -o /opt/openfoam171/applications/bin/linux64GccDPOpt/pisoFoam
/usr/lib64/gcc/x86_64-suse-linux/4.5/../../../../x86_64-suse-linux/bin/ld: cannot find -liberty
collect2: ld returned 1 exit status
make: *** [/opt/openfoam171/applications/bin/linux64GccDPOpt/pisoFoam] Error 1
magma@r-soll34:/opt/openfoam171/applications/solvers/incompressible/pisoFoam>
%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%
I do not know why it says "cannot find liberty"!!!

akidess April 29, 2011 03:53

http://www.cfd-online.com/Forums/ope...se-11-2-a.html

hawkeye321 April 30, 2011 14:20

Thank you very much akidess!!!
The problem has been fixed and now I can compile successfully!!!

hawkeye321 April 30, 2011 14:24

I want to edit scalarTransportFoam.C by adding another if loop to it!!! in such a way that for T > 5 ; another term be added to the equation!
I did it this way
%%%%%
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
{
fvScalarMatrix TEqn
(
fvm::ddt(T)
+ fvm::div(phi, T)
- fvm::laplacian(DT, T)
);
if (TEqn> 5)
{
TEqn += fvm::laplacian(DT, T);
};

TEqn.solve();

}
but when I compile it I get the following error
%%%%%%
ConductionMT.C: In function ‘int main(int, char**)’:
ConductionMT.C:66:23: error: no match for ‘operator>’ in ‘TEqn > 5’
/opt/openfoam171/src/finiteVolume/lnInclude/readSIMPLEControls.H:6:10: warning: unused variable ‘momentumPredictor’
/opt/openfoam171/src/finiteVolume/lnInclude/readSIMPLEControls.H:9:10: warning: unused variable ‘transonic’
make: *** [Make/linux64GccDPOpt/ConductionMT.o] Error 1
%%%%%%

Would you please help me fix the problem??


All times are GMT -4. The time now is 18:46.