|
[Sponsors] |
January 16, 2014, 12:14 |
|
#101 |
Senior Member
|
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()) ) ); } } 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(); } ... } About radiation term addition: Can't you just write it like: Code:
cp*radiation->Sh(thermo) |
|
January 17, 2014, 07:11 |
|
#102 | |
Member
Join Date: Nov 2011
Location: Berlin
Posts: 31
Rep Power: 15 |
thank you alexeym, for your hints!
Quote:
To test the way via another variable, in buoyantSimpleRadiationFoam i defined Code:
Foam::fvScalarMatrix fsm_radiationSource = radiation->Sh(thermo) ; 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 ); 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 ); 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 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: 12 |
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: AUS
Posts: 137
Rep Power: 15 |
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: 12 |
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 |
|
January 30, 2014, 11:52 |
|
#106 |
Member
Thomas Vossel
Join Date: Aug 2013
Location: Germany
Posts: 45
Rep Power: 13 |
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 ); 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) ); 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? 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: AUS
Posts: 137
Rep Power: 15 |
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: 17 |
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: http://www.cfd-online.com/Forums/ope...ies-false.html 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: 12 |
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: Germany
Posts: 213
Rep Power: 18 |
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: 12 |
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: AUS
Posts: 137
Rep Power: 15 |
Hi Wumin,
Have tried with the meltFoam version provided by Fabian in post#19 (http://www.cfd-online.com/Forums/ope...g-problem.html) ? |
|
March 6, 2014, 04:35 |
Enthalpy linearization
|
#113 |
Member
Rohith
Join Date: Oct 2012
Location: Germany
Posts: 57
Rep Power: 14 |
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 11:16. |
|
March 6, 2014, 07:36 |
|
#114 |
Senior Member
Mohammad Shakil Ahmmed
Join Date: Oct 2012
Location: AUS
Posts: 137
Rep Power: 15 |
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: Germany
Posts: 57
Rep Power: 14 |
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: 13 |
Quote:
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: 13 |
hello! Have your problem been solved?
|
|
March 8, 2014, 04:05 |
|
#118 |
Member
Rohith
Join Date: Oct 2012
Location: Germany
Posts: 57
Rep Power: 14 |
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, 04:56 |
Solver Update Fabian Rösler OF2.3.0
|
#119 |
Member
Anja Miehe
Join Date: Dec 2009
Location: Freiberg / Germany
Posts: 48
Rep Power: 17 |
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 |
|
April 17, 2014, 03:59 |
help
|
#120 | |
New Member
Zhipeng Zhou
Join Date: Mar 2014
Posts: 8
Rep Power: 12 |
Quote:
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 |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Melting and solidification with free surface problem? | cqlwj123 | CFX | 6 | July 25, 2013 03:46 |
Can I solve this problem by Fluent? | Kai_kc | FLUENT | 1 | October 27, 2010 06:29 |
natural convection problem for a CHT problem | Se-Hee | CFX | 2 | June 10, 2007 07:29 |
Adiabatic and Rotating wall (Convection problem) | ParodDav | CFX | 5 | April 29, 2007 20:13 |
Melting Problem | M | FLUENT | 0 | April 29, 2007 17:07 |