CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM

melting problem

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

Like Tree74Likes

Reply
 
LinkBack Thread Tools Display Modes
Old   January 16, 2014, 12:14
Default
  #101
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,132
Rep Power: 20
alexeym will become famous soon enoughalexeym will become famous soon enough
Hi,

Concerning your dimension problem, if you take a look at for ex. EulerDdtScheme.C, definition for fvc::ddt is

Code:
EulerDdtScheme<Type>::fvcDdt
(
    const volScalarField& rho,
    const GeometricField<Type, fvPatchField, volMesh>& vf
)
{
...
    else
    {
        return tmp<GeometricField<Type, fvPatchField, volMesh> >
        (
            new GeometricField<Type, fvPatchField, volMesh>
            (
                ddtIOobject,
                rDeltaT*(rho*vf - rho.oldTime()*vf.oldTime())
            )
        );
    }
}
in your case rho is cp, while for fvm::ddt is

Code:
template<class Type>
tmp<fvMatrix<Type> >
EulerDdtScheme<Type>::fvmDdt
(
    const volScalarField& rho,
    const GeometricField<Type, fvPatchField, volMesh>& 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?
alexeym is offline   Reply With Quote

Old   January 17, 2014, 07:11
Default
  #102
dzi
Member
 
Join Date: Nov 2011
Location: Berlin
Posts: 31
Rep Power: 5
dzi is on a distinguished road
thank you alexeym, for your hints!

Quote:
Originally Posted by alexeym View Post
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)")
      + fsm_radiationSource 
    );
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)
      + hs*exp(-pow((T-Tmelt)/Tdim,2))/Foam::sqrt(constant::mathematical::pi)/Tdim*(U & fvc::grad(T))
      - fvm::laplacian(lambda/rho, T)
      +  cp*fsm_radiationSource
    );
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
dzi is offline   Reply With Quote

Old   January 27, 2014, 08:36
Default
  #103
New Member
 
Robert mellema
Join Date: Jan 2014
Posts: 3
Rep Power: 3
Dostoyefsky is on a distinguished road
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
Dostoyefsky is offline   Reply With Quote

Old   January 27, 2014, 09:58
Default
  #104
Senior Member
 
Mohammad Shakil Ahmmed
Join Date: Oct 2012
Location: AU
Posts: 123
Rep Power: 5
ahmmedshakil is on a distinguished road
Would please write down the species equation and condition you want to impose?
ahmmedshakil is offline   Reply With Quote

Old   January 27, 2014, 10:14
Default
  #105
New Member
 
Robert mellema
Join Date: Jan 2014
Posts: 3
Rep Power: 3
Dostoyefsky is on a distinguished road
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<alpha1<1) by using phase diagram.
Would you give me some advice please?

Regards
Robert
Dostoyefsky is offline   Reply With Quote

Old   January 30, 2014, 11:52
Default
  #106
Member
 
Thomas Vossel
Join Date: Aug 2013
Location: Germany
Posts: 45
Rep Power: 4
ThomasV is on a distinguished road
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:

fvm::ddt(Temp) = \frac{\partial T}{\partial t} = \frac{\Delta T}{\Delta t} = \frac{temperatureChange}{oldTimestep} \quad \Rightarrow \frac{L \cdot \Delta f_s}{\Delta T} \cdot \frac{\Delta T}{\Delta t} = \frac{L \cdot \Delta f_s}{\Delta t}

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.
ThomasV is offline   Reply With Quote

Old   February 19, 2014, 08:10
Default melting/solidification with temperature dependent thermo-properties
  #107
Senior Member
 
Mohammad Shakil Ahmmed
Join Date: Oct 2012
Location: AU
Posts: 123
Rep Power: 5
ahmmedshakil is on a distinguished road
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.
ahmmedshakil is offline   Reply With Quote

Old   February 19, 2014, 08:33
Default
  #108
Member
 
Anja Miehe
Join Date: Dec 2009
Location: Freiberg / Germany
Posts: 48
Rep Power: 7
AnjaMiehe is on a distinguished road
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
AnjaMiehe is offline   Reply With Quote

Old   February 26, 2014, 02:23
Default 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
wumin is on a distinguished road
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
wumin is offline   Reply With Quote

Old   February 26, 2014, 03:40
Default Version mismatch
  #110
Senior Member
 
fabian_roesler's Avatar
 
Fabian Roesler
Join Date: Mar 2009
Location: Bad Friedrichshall, Germany
Posts: 164
Rep Power: 8
fabian_roesler is on a distinguished road
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
fabian_roesler is offline   Reply With Quote

Old   February 26, 2014, 08:13
Default
  #111
New Member
 
wumin
Join Date: Feb 2014
Posts: 7
Rep Power: 3
wumin is on a distinguished road
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.
wumin is offline   Reply With Quote

Old   February 28, 2014, 02:57
Default
  #112
Senior Member
 
Mohammad Shakil Ahmmed
Join Date: Oct 2012
Location: AU
Posts: 123
Rep Power: 5
ahmmedshakil is on a distinguished road
Hi Wumin,
Have tried with the meltFoam version provided by Fabian in post#19 (melting problem) ?
ahmmedshakil is offline   Reply With Quote

Old   March 6, 2014, 04:35
Default Enthalpy linearization
  #113
Member
 
Rohith
Join Date: Oct 2012
Location: Bayreuth, Germany
Posts: 46
Rep Power: 4
RaghavendraRohith is on a distinguished road
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.
RaghavendraRohith is offline   Reply With Quote

Old   March 6, 2014, 07:36
Default
  #114
Senior Member
 
Mohammad Shakil Ahmmed
Join Date: Oct 2012
Location: AU
Posts: 123
Rep Power: 5
ahmmedshakil is on a distinguished road
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 \frac{d\gamma}{dt} 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
ahmmedshakil is offline   Reply With Quote

Old   March 6, 2014, 07:42
Default
  #115
Member
 
Rohith
Join Date: Oct 2012
Location: Bayreuth, Germany
Posts: 46
Rep Power: 4
RaghavendraRohith is on a distinguished road
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.
RaghavendraRohith is offline   Reply With Quote

Old   March 8, 2014, 03:31
Default a wmake problem
  #116
New Member
 
houwy
Join Date: Nov 2013
Posts: 21
Rep Power: 3
houwy is on a distinguished road
Quote:
Originally Posted by fabian_roesler View Post
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
houwy is offline   Reply With Quote

Old   March 8, 2014, 03:34
Default
  #117
New Member
 
houwy
Join Date: Nov 2013
Posts: 21
Rep Power: 3
houwy is on a distinguished road
hello! Have your problem been solved?
houwy is offline   Reply With Quote

Old   March 8, 2014, 04:05
Default
  #118
Member
 
Rohith
Join Date: Oct 2012
Location: Bayreuth, Germany
Posts: 46
Rep Power: 4
RaghavendraRohith is on a distinguished road
Quote:
Originally Posted by houwy View Post
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.
RaghavendraRohith is offline   Reply With Quote

Old   April 9, 2014, 03:56
Default Solver Update Fabian Rösler OF2.3.0
  #119
Member
 
Anja Miehe
Join Date: Dec 2009
Location: Freiberg / Germany
Posts: 48
Rep Power: 7
AnjaMiehe is on a distinguished road
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
File Type: gz convMeltFoamOF230.tar.gz (7.6 KB, 111 views)
apple-tree, shuisheng and AnkitV like this.
AnjaMiehe is offline   Reply With Quote

Old   April 17, 2014, 02:59
Default help
  #120
New Member
 
Zhipeng Zhou
Join Date: Mar 2014
Posts: 8
Rep Power: 3
zhouzhipeng77 is on a distinguished road
Quote:
Originally Posted by fabian_roesler View Post
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?
zhouzhipeng77 is offline   Reply With Quote

Reply

Tags
melting openfoam

Thread Tools
Display Modes

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 Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
conduction problem venkataramana OpenFOAM 3 December 1, 2013 08:30
natural convection problem for a CHT problem Se-Hee CFX 2 June 10, 2007 06:29
Adiabatic and Rotating wall (Convection problem) ParodDav CFX 5 April 29, 2007 19:13
Melting Problem M FLUENT 0 April 29, 2007 16:07
Is this problem well posed? Thomas P. Abraham Main CFD Forum 5 September 8, 1999 14:52


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