# melting problem

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

 January 16, 2014, 12:14 #101 Senior Member   Alexey Matveichev Join Date: Aug 2011 Location: Nancy, France Posts: 1,132 Rep Power: 20 Hi, Concerning your dimension problem, if you take a look at for ex. EulerDdtScheme.C, definition for fvc::ddt is Code: EulerDdtScheme::fvcDdt ( const volScalarField& rho, const GeometricField& vf ) { ... else { return tmp > ( new GeometricField ( ddtIOobject, rDeltaT*(rho*vf - rho.oldTime()*vf.oldTime()) ) ); } } in your case rho is cp, while for fvm::ddt is Code: template tmp > EulerDdtScheme::fvmDdt ( const volScalarField& rho, const GeometricField& vf ) { ... { fvm.source() = rDeltaT *rho.oldTime().internalField() *vf.oldTime().internalField()*mesh().V(); } ... } Guess it's where dimensions difference comes from. About radiation term addition: Can't you just write it like: Code: cp*radiation->Sh(thermo) as you enthalpy equation is basically temperature equation times specific heat?

January 17, 2014, 07:11
#102
Member

Join Date: Nov 2011
Location: Berlin
Posts: 31
Rep Power: 5
thank you alexeym, for your hints!

Quote:
 Originally Posted by alexeym Hi, About radiation term addition: Can't you just write it like: Code: cp*radiation->Sh(thermo) as you enthalpy equation is basically temperature equation times specific heat?
-> that is also what I thought.

To test the way via another variable, in buoyantSimpleRadiationFoam i defined

Code:
Foam::fvScalarMatrix fsm_radiationSource =  radiation->Sh(thermo) ;
and in the solver hEqn.H
Code:
  fvScalarMatrix hEqn
(
fvm::div(phi, h)
- fvm::Sp(fvc::div(phi), h)
- fvm::laplacian(turbulence->alphaEff(), h)
==
- fvc::div(phi, 0.5*magSqr(U), "div(phi,K)")
);
which works.

but when I use radiation in melt solver in similar way:
Code:
    Foam::fvScalarMatrix fsm_radiationSource =  radiation->Sh(thermo);
Code:
    fvScalarMatrix hEqn
(
fvm::ddt(cp, T)
+ fvm::div(phi*fvc::interpolate(cp), T)
+ hs*exp(-pow((T-Tmelt)/Tdim,2))/Foam::sqrt(constant::mathematical::pi)/Tdim*fvm::ddt(T)
- fvm::laplacian(lambda/rho, T)
);
it runs into this (dimension? field?) error

Code:
--> FOAM FATAL ERROR:
incompatible fields for operation
[T] + [h]

From function checkMethod(const fvMatrix<Type>&, const fvMatrix<Type>&)
in file /opt/openfoam211/src/finiteVolume/lnInclude/fvMatrix.C at line 1303.

FOAM aborting
thanks again, i think i will try something else...

Last edited by dzi; January 17, 2014 at 07:12. Reason: formatting

 January 27, 2014, 08:36 #103 New Member   Robert mellema Join Date: Jan 2014 Posts: 3 Rep Power: 3 Hello everyone, I am trying to include species eqn to the enthalpy porosity solver and I want to add a loop in case of 0 < alpha < 1 (by using if statement?). Since I am new to openfoam, I don't know how to do it. Can somebody help me? Thanks in advance Robert

 January 27, 2014, 09:58 #104 Senior Member   Mohammad Shakil Ahmmed Join Date: Oct 2012 Location: AU Posts: 123 Rep Power: 5 Would please write down the species equation and condition you want to impose?

 January 27, 2014, 10:14 #105 New Member   Robert mellema Join Date: Jan 2014 Posts: 3 Rep Power: 3 Well, actually I am using solver created by Mr. Fabian Roesler (convMeltFoam). After solving the energy equation, I want to calculate the equilibrium concentration at the interface (0

 January 30, 2014, 11:52 #106 Member   Thomas Vossel Join Date: Aug 2013 Location: Germany Posts: 45 Rep Power: 4 Hi! I'd like to ask for advice for a solver problem of mine. I'm looking into an alloy phase change problem and ran into some problems with the energy equation. What works so far is this: Code:  fvScalarMatrix TEqn ( sensibleH * fvm::ddt(Temp) + fvm::div(phiMix * fvc::interpolate(sensibleH), Temp, "div(phib*specificH,Temp)") - fvm::laplacian(lambda / rhob, Temp, "laplacian(lambda|rhob,Temp)") - Lb * deltaFracSol / oldTimestep ); This gives me the graph I want as can be seen here with nice primary and eutectic solidification: graph good.jpg The problem now is that the above simulation was done for a single cell. When doing simulations with multiple cells and convection this won't work and give strange results. So one has to use a source term just like the first to lines of code with a time derivation and a divergence. I'll leave convection aside for now and do this: Code:  fvScalarMatrix TEqn ( sensibleH * fvm::ddt(Temp) + fvm::div(phiMix * fvc::interpolate(sensibleH), Temp, "div(phib*specificH,Temp)") - fvm::laplacian(lambda / rhob, Temp, "laplacian(lambda|rhob,Temp)") + Lb * deltaFracSol / temperatureChange * fvm::ddt(Temp) ); This unfortunately gives me this result I also had presented in an early post of mine: Graph_Temp_alpha.jpg Primary and eutectic solidification sort of exist but the entire recalescence aspect is gone... I now would like to know if you have any suggestions as to what I should do or give advice as to why the second result is so different. By design both should be the same equation as one might say: So the source term expression for both approaches should be pretty much the same or am I mistaken here? Another difference is the sign of the source term one has to add or subtract depending on which variant is used (EDIT: This is ok though as I simply defined my temperatureChange field the other way round.)... Does anyone have an idea what is wrong with the approach with OpenFOAM's fvm::ddt(Temp) and why the temperature won't rise but stay the same? shuisheng likes this. Last edited by ThomasV; January 31, 2014 at 09:50.

 February 19, 2014, 08:10 melting/solidification with temperature dependent thermo-properties #107 Senior Member   Mohammad Shakil Ahmmed Join Date: Oct 2012 Location: AU Posts: 123 Rep Power: 5 Hi, Has anyone working with melting/solidification modelling considering temperature dependent thermo physical properties (i.e. Cp = Cp(T), K=K(T)) ? Please give some advice how to deal with this type of problem ? I have used the source based enthalpy method as Fabian, but the problem happens when I make thermophysical properties as variable Thanks in advance Last edited by ahmmedshakil; February 19, 2014 at 10:21.

 February 19, 2014, 08:33 #108 Member   Anja Miehe Join Date: Dec 2009 Location: Freiberg / Germany Posts: 48 Rep Power: 7 Hello Shakil, I am so sorry, I almost forgot about you. At present, I am writing my things together for my PhD and my contract is running out, so I am bit blinkered. For the implementation of temperature dependent thermophysical properties in general, please take a look here: Read temperature dependent thermophysical properties from a file - boundaries false Then, going on from post #56, use the interpolation procedure within the do-loop. When you implement it, start with the thermophysical post and get that one to run. After that, if you go for solidification / melting with dependent properties, start with a weak dependence and build up from there. I am going to publish my code as soon as I have my PhD ready, but that might take some months. Best Regards, Anja

 February 26, 2014, 02:23 Anybody can help me?when I compile meltFoam with wmake command,i face a problem. #109 New Member   wumin Join Date: Feb 2014 Posts: 7 Rep Power: 3 Anybody can help me?when I compile meltFoam with wmake command,i face a problem about compiling meltFoam: fuguang@fuguang-Veriton-D630:~/Downloads/meltFoam_solver$wmake SOURCE=meltFoam.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I/opt/openfoam230/src/finiteVolume/lnInclude -IlnInclude -I. -I/opt/openfoam230/src/OpenFOAM/lnInclude -I/opt/openfoam230/src/OSspecific/POSIX/lnInclude -fPIC -c$SOURCE -o Make/linux64GccDPOpt/meltFoam.o In file included from meltFoam.C:83:0: pEqn.H: In function ‘int main(int, char**)’: pEqn.H:8:11: error: ‘ddtPhiCorr’ is not a member of ‘Foam::fvc’ /opt/openfoam230/src/finiteVolume/lnInclude/readTimeControls.H:38:8: warning: unused variable ‘maxDeltaT’ [-Wunused-variable] make: *** [Make/linux64GccDPOpt/meltFoam.o] Error 1

 February 26, 2014, 03:40 Version mismatch #110 Senior Member     Fabian Roesler Join Date: Mar 2009 Location: Bad Friedrichshall, Germany Posts: 164 Rep Power: 8 Hi wumin This sounds to me like a version mismatch. Which OpenFOAM version do you use? I bet you use OpenFOAM 2.3.x since the ddtPhiCorr in pEqn was changed to a more general ddtCorr. Have a look into other pEqn of standard solvers in OF and check for differences pEqn.H:8:11: error: ‘ddtPhiCorr’ is not a member of ‘Foam::fvc’ Regards Fabian

 February 26, 2014, 08:13 #111 New Member   wumin Join Date: Feb 2014 Posts: 7 Rep Power: 3 Hi Fabian, thanks for your reply.You are right! The version I now use is OpenFoam-2.3.0. My work is mainly to simulate the melting and solidification of selective laser melting（3D printing）. I want to compile the meltFoam,but always fail.Can you tell me how to deal with the problem? the system I install is ubuntu 12.04.

 February 28, 2014, 02:57 #112 Senior Member   Mohammad Shakil Ahmmed Join Date: Oct 2012 Location: AU Posts: 123 Rep Power: 5 Hi Wumin, Have tried with the meltFoam version provided by Fabian in post#19 (melting problem) ?

 March 6, 2014, 04:35 Enthalpy linearization #113 Member   Rohith Join Date: Oct 2012 Location: Bayreuth, Germany Posts: 46 Rep Power: 4 Hi I have been working on the melting problem for one month and more. I am using the solver from Fabian as a test bed to implement the enthalpy linearization. while in this method, it is a bit complex to implement it in OpenFOAM. Somebody has gone through this method in the past? Best Regards Rohith Last edited by RaghavendraRohith; April 2, 2014 at 10:16.

 March 6, 2014, 07:36 #114 Senior Member   Mohammad Shakil Ahmmed Join Date: Oct 2012 Location: AU Posts: 123 Rep Power: 5 Hi RaghavendraRohith, It sounds cool that someone also trying with the enthalpy linearization method. I'm using linearization method based on Voller's source based method i.e. linearization of the term. I have also validated my case with the gallium melting and the results are cool! But now stuck with different types of problem... #shakil

 March 6, 2014, 07:42 #115 Member   Rohith Join Date: Oct 2012 Location: Bayreuth, Germany Posts: 46 Rep Power: 4 Hi Shakil Actually I am not asking for source based method Please go through it, let me know your idea if so. Regards Rohith Last edited by RaghavendraRohith; March 10, 2014 at 03:34.

March 8, 2014, 03:31
a wmake problem
#116
New Member

houwy
Join Date: Nov 2013
Posts: 21
Rep Power: 3
Quote:
 Originally Posted by fabian_roesler Hi all I posted that it might take some time to review the meltFoam solver and port it from OF_1.7 to OF_2.1 but I felt like doing it instantly. So here you go . I hope you enjoy it. Regards Fabian
Hello! Fabian
I have some problem to wmake meltFoam on OF2.2.0. Can you help me to solve this problem. I'm a new user and I want to know if I can use this Foam to simulate a solid particle dissolution in liquid.
Thanks very much!

Making dependency list for source file meltFoam.C
SOURCE=meltFoam.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I/opt/openfoam220/src/finiteVolume/lnInclude -IlnInclude -I. -I/opt/openfoam220/src/OpenFOAM/lnInclude -I/opt/openfoam220/src/OSspecific/POSIX/lnInclude -fPIC -c \$SOURCE -o Make/linux64GccDPOpt/meltFoam.o
/opt/openfoam220/src/finiteVolume/lnInclude/readTimeControls.H: In function ‘int main(int, char**)’:
/opt/openfoam220/src/finiteVolume/lnInclude/readTimeControls.H:38:8: warning: unused variable ‘maxDeltaT’ [-Wunused-variable]
g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I/opt/openfoam220/src/finiteVolume/lnInclude -IlnInclude -I. -I/opt/openfoam220/src/OpenFOAM/lnInclude -I/opt/openfoam220/src/OSspecific/POSIX/lnInclude -fPIC -Xlinker --add-needed -Xlinker --no-as-needed Make/linux64GccDPOpt/meltFoam.o -L/opt/openfoam220/platforms/linux64GccDPOpt/lib \
-lfiniteVolume -lOpenFOAM -ldl -lm -o /home/hwy/OpenFOAM/hwy-2.2.0/platforms/linux64GccDPOpt/bin/meltFoam

 March 8, 2014, 03:34 #117 New Member   houwy Join Date: Nov 2013 Posts: 21 Rep Power: 3 hello! Have your problem been solved?

March 8, 2014, 04:05
#118
Member

Rohith
Join Date: Oct 2012
Location: Bayreuth, Germany
Posts: 46
Rep Power: 4
Quote:
 Originally Posted by houwy hello! Have your problem been solved?

Hello Houwy

This is not fabian, but i can help you in this aspect

I do not see what actually is your problem, the solver is compiled now and may be you can simulate your case, yes meltFoam is a solver to solve melting of a solid particle or a solid body.

Go forward with your simulation once

Regards
Rohith

Last edited by RaghavendraRohith; March 10, 2014 at 03:39.

April 9, 2014, 03:56
Solver Update Fabian Rösler OF2.3.0
#119
Member

Anja Miehe
Join Date: Dec 2009
Location: Freiberg / Germany
Posts: 48
Rep Power: 7
Hello everyone,

here is Fabians convMeltFoam solver of post #81 for you compiling in OpenFOAM 2.3.0 with the test case, as one boundary condition for the pressure changed its name. Have fun using it.

Regards, Anja
Attached Files
 convMeltFoamOF230.tar.gz (7.6 KB, 111 views)

April 17, 2014, 02:59
help
#120
New Member

Zhipeng Zhou
Join Date: Mar 2014
Posts: 8
Rep Power: 3
Quote:
 Originally Posted by fabian_roesler Hi all I posted that it might take some time to review the meltFoam solver and port it from OF_1.7 to OF_2.1 but I felt like doing it instantly. So here you go . I hope you enjoy it. Regards Fabian
Hello,
Fabian.Thank you for your solver about melting.But I have some questions with your solver. In the UEqn.H , you use a symbol "DC" calculated form DCl,DCs and alpha. Can you explain what are their meanings ? And can you give me your mathematical model?

 Tags melting openfoam

 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 venkataramana OpenFOAM 3 December 1, 2013 08:30 Se-Hee CFX 2 June 10, 2007 06:29 ParodDav CFX 5 April 29, 2007 19:13 M FLUENT 0 April 29, 2007 16:07 Thomas P. Abraham Main CFD Forum 5 September 8, 1999 14:52

All times are GMT -4. The time now is 04:36.