
[Sponsors] 
Problem in using new "fvOptions" called "solidificationMeltingSource" 

LinkBack  Thread Tools  Search this Thread  Display Modes 
October 20, 2015, 13:23 
Problem in using new "fvOptions" called "solidificationMeltingSource"

#1 
New Member
...
Join Date: Jun 2013
Posts: 19
Rep Power: 11 
Hello FOAMers,
I have the following problem when trying to run a case with "buoyantBoussinesqPimpleFoam" with the new "fvOptions" in OF 2.4 called "solidificationMeltingSource" for simulating phase change (melting/solidification). I used a typical setup for this solver and also included the respective "fvOptions" file in the "system" folder. However, I get the following error: Code:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Create time Create mesh for time = 0 Reading g Reading thermophysical properties Reading field T Reading field p_rgh Reading field U Reading/calculating face flux field phi Selecting incompressible transport model Newtonian Creating turbulence model Selecting RAS turbulence model laminar Reading field alphat Calculating field g.h Radiation model not active: radiationProperties not found Selecting radiationModel none Creating finite volume options from "system/fvOptions" Selecting finite volume options model type solidificationMeltingSource Source: solidificationMeltingSource1  applying source for all time  selecting cells using cellZone PCM  selected 10000 cell(s) with volume 0.0001 Courant Number mean: 0 max: 0 PIMPLE: no residual control data found. Calculations will employ 2 corrector loops Starting time loop Time = 1e05 Courant Number mean: 0 max: 0 deltaT = 1.2e05 PIMPLE: iteration 1 > FOAM FATAL ERROR: request for basicThermo thermophysicalProperties from objectRegistry region0 failed available objects of type basicThermo are 0() From function objectRegistry::lookupObject<Type>(const word&) const in file /home/openfoam/OpenFOAM/OpenFOAM2.4.0/src/OpenFOAM/lnInclude/objectRegistryTemplates.C at line 198. FOAM aborting #0 Foam::error::printStack(Foam::Ostream&) at ??:? #1 Foam::error::abort() at ??:? #2 Foam::basicThermo const& Foam::objectRegistry::lookupObject<Foam::basicThermo>(Foam::word const&) const at ??:? #3 Foam::fv::solidificationMeltingSource::Cp() const at ??:? #4 Foam::fv::solidificationMeltingSource::addSup(Foam::fvMatrix<Foam::Vector<double> >&, int) at ??:? #5 ? at ??:? #6 ? at ??:? #7 __libc_start_main in "/lib/x86_64linuxgnu/libc.so.6" #8 ? at ??:? Aborted (core dumped) Code:
/** C++ **\  =========    \\ / F ield  OpenFOAM: The Open Source CFD Toolbox   \\ / O peration  Version: 2.4.0   \\ / A nd  Web: www.OpenFOAM.org   \\/ M anipulation   \**/ FoamFile { version 2.0; format ascii; class dictionary; location "system"; object fvOptions; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // solidificationMeltingSource1 { type solidificationMeltingSource; active on; selectionMode cellZone; cellZone PCM; solidificationMeltingSourceCoeffs { Tmelt 505.00; L 60000.0; thermoMode thermo; // The problem is here // relax 0.7; beta 2.67e4; Cu 1.0e+05; // Default value Cu=1.0e+05 // q 1.0e03; // Default value q=1.0e03 // rhoRef 7500.0; // Solid density // } } // ************************************************************************* // Any help would be very appreciated! Thank you in advance 

October 20, 2015, 14:45 

#2 
Senior Member

Hi,
In addition to thermo there is lookup thermoMode. Since you are using buoyantBoussinesqPimpleFoam there is really no thermo object. So you put lookup instead of thermo in your solidificationMeltingSourceCoeffs. But since you do not have thermo object, you have to set CpName to CpRef and provide CpRef (specific heat) in solidificationMeltingSourceCoeffs. Code:
Foam::tmp<Foam::volScalarField> Foam::fv::solidificationMeltingSource::Cp() const { switch (mode_) { ... case mdLookup: { if (CpName_ == "CpRef") { scalar CpRef = readScalar(coeffs_.lookup("CpRef")); ... } ... Code:
scalar S = Cu_*sqr(1.0  alpha1c)/(pow3(alpha1c) + q_); 

December 7, 2015, 04:14 

#3 
Senior Member
Baris (Heewa)
Join Date: Jan 2013
Location: Japan
Posts: 130
Rep Power: 12 
Hi Alexey,
thank you for information. Nowadays, I would like to use solidificationMeltingSource option inside compressibleInterFoam to model the nitrogen phase change within Naval Nozzle. At the beginning I tried to understand the source code of solidificationMeltingSource option. Since in .H file, it is stated that model is based on following papers: Code:
1. V.R. Voller and C. Prakash, A fixed grid numerical modelling methodology for convectiondiffusion mushy phasechange problems, Int. J. Heat Mass Transfer 30(8):17091719, 1987. 2. C.R. Swaminathan. and V.R. Voller, A general enthalpy model for modeling solidification processes, Metallurgical Transactions 23B:651664, 1992. Both of them are using different equations and when I looked at the source code I cant understand which one is used exactly. For example, I didnt see followingKozenyCarman equation in the papers. Code: scalar S = Cu_*sqr(1.0  alpha1c)/(pow3(alpha1c) + q_); So could you help me to understand exactly which parts of papers are used in the code? Also I would like to ask your help to understand following lines of source codes: In solidificationMeltingSourceTemplates.C Code:
// contributions added to rhs of solver equation if (eqn.psi().dimensions() == dimTemperature) { // isothermal phase change  only include time derivative // eqn = L/Cp*(fvc::ddt(rho, alpha1_) + fvc::div(phi, alpha1_)); eqn = L/Cp*(fvc::ddt(rho, alpha1_)); } else { // isothermal phase change  only include time derivative // eqn = L*(fvc::ddt(rho, alpha1_) + fvc::div(phi, alpha1_)); eqn = L*(fvc::ddt(rho, alpha1_)); thanks in advance. 

December 7, 2015, 05:16 

#4 
Senior Member

Hi,
Do I get you right, you want me to 1. Download articles, 2. Read them, 3. Point out difference between articles and implemetation of solidificationMeltingSource? Sounds rather funny. Unfortunately I have never seen two articles you are referencing, yet in general Voller in his papers deals with the part of algorithm responsible for updating liquid fraction. The way you calculate matter permeability depends on the nature of solidification process. "Usually" people use KozenyCarman equation but it is not mandatory to go this way. Concerning the second part of your questions, yes, equations have the same explanation since they are (almost) identical. This line Code:
eqn.psi().dimensions() == dimTemperature Code:
L*fvc::ddt(rho, alpha1_) 

December 7, 2015, 19:22 

#5 
Senior Member
Baris (Heewa)
Join Date: Jan 2013
Location: Japan
Posts: 130
Rep Power: 12 
Hi Alexey,
No, you misunderstood. Of course I did not mean that. I just thought that you already had a look these papers since you are using this fvOption and solidificationMeltingSource is based on these papers as written in .H file. By the way thank you very much for informative explanation. My last question is that I have gas and liquid nitrogen at the inlet of the naval nozzle. They have reaction so fast and inside of naval nozzle solid phase appears with liquid phase. Do you think that compressibleInterFoam with the solidificationMeltingSource can be a good choice? Thank you in advance. 

December 8, 2015, 03:06 

#6 
Senior Member

Hi,
In fact I do not use solidificationMeltingSource, to answer threadstarter's question I have just looked at the sources. One of the drawbacks of Voller's liquid fraction update method, it is applicable only to pure substances (i.e. you have melting temperature instead of melting range). Unfortunately description of the problem is rather vague to choose solver. Maybe you could start with a list of phenomena you have to address in your simulation and then choice of the solver becomes obvious? Right now I do not see the reason for messing with VOF. 

December 11, 2015, 03:59 

#7 
Senior Member
Baris (Heewa)
Join Date: Jan 2013
Location: Japan
Posts: 130
Rep Power: 12 
Hi Alex,
I set my fvOptions in the compressibleInterFoam as follows Code:
solidificationMeltingSource1 { type solidificationMeltingSource; active yes; //on; solidificationMeltingSourceCoeffs { selectionMode all; cellZone hotplate; Tmelt 63.15; //K L 25702; //Latent heat of fusion [J/kg] relax 0.8; // relaxation coefficient [0~1] thermoMode lookup; //thermo; CpName CpRef; CpRef 2064; beta 0.00753; //thermal expansion coefficient [1/K] rhoRef 860.65; //solid density Cu 1.0e5; //Model coefficient default value q 1.0e6; //to avoid dividing zero } } PIMPLE: iteration 1 MULES: Solving for alpha.N2liquid Liquid phase volume fraction = 0 Min(alpha.N2liquid) = 0 Min(alpha.N2gas) = 1 MULES: Solving for alpha.N2liquid Liquid phase volume fraction = 0 Min(alpha.N2liquid) = 0 Min(alpha.N2gas) = 1 diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 > FOAM Warning : From function void option::checkApplied() const in file fvOption/fvOption.C at line 120 Source solidificationMeltingSource1 defined for field T but never used > FOAM Warning : From function void option::checkApplied() const in file fvOption/fvOption.C at line 120 Source solidificationMeltingSource1 defined for field T but never used You can see also some steps taken from logfile below HTML Code:
Create time Create mesh for time = 0 PIMPLE: Operating solver in PISO mode Reading field p_rgh Reading field U Reading/calculating face flux field phi Constructing twoPhaseMixtureThermo Selecting thermodynamics package { type heRhoThermo; mixture pureMixture; transport const; thermo hConst; equationOfState perfectFluid; specie specie; energy sensibleInternalEnergy; } Selecting thermodynamics package { type heRhoThermo; mixture pureMixture; transport const; thermo hConst; equationOfState perfectGas; specie specie; energy sensibleInternalEnergy; } createFields.H::Reading field alpha1 createFields.H::Calculating field alpha1 Reading thermophysical properties Reading g Reading hRef Calculating field g.h Selecting turbulence model type laminar Creating field kinetic energy K Creating finite volume options from "constant/fvOptions" Selecting finite volume options model type solidificationMeltingSource Source: solidificationMeltingSource1  selecting all cells  selected 618000 cell(s) with volume 3.5095642e08 Courant Number mean: 7.1233916e08 max: 0.0006097561 Starting time loop Courant Number mean: 7.1233916e08 max: 0.0006097561 deltaT = 1.1904762e09 Time = 1.19047619e09 PIMPLE: iteration 1 MULES: Solving for alpha.N2liquid Liquid phase volume fraction = 0 Min(alpha.N2liquid) = 0 Min(alpha.N2gas) = 1 MULES: Solving for alpha.N2liquid Liquid phase volume fraction = 0 Min(alpha.N2liquid) = 0 Min(alpha.N2gas) = 1 diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 smoothSolver: Solving for Ux, Initial residual = 1, Final residual = 2.5463107e14, No Iterations 2 smoothSolver: Solving for Uy, Initial residual = 1, Final residual = 1.1932199e14, No Iterations 2 smoothSolver: Solving for T, Initial residual = 1, Final residual = 1.4906003e09, No Iterations 2 min(T) 300 max(T) = 300.15601 GAMG: Solving for p_rgh, Initial residual = 1, Final residual = 3.616368e10, No Iterations 1 max(U) 10 min(p_rgh) 100000 GAMG: Solving for p_rgh, Initial residual = 0.00019165183, Final residual = 4.8057813e11, No Iterations 1 max(U) 10 min(p_rgh) 100000 GAMG: Solving for p_rgh, Initial residual = 2.7732851e07, Final residual = 4.7384965e11, No Iterations 1 max(U) 10 min(p_rgh) 100000 GAMGPCG: Solving for p_rgh, Initial residual = 4.9004527e10, Final residual = 4.9004527e10, No Iterations 0 max(U) 10 min(p_rgh) 100000 ExecutionTime = 7.47 s Courant Number mean: 8.5337227e08 max: 0.0007281608 deltaT = 1.4115646e09 Time = 2.602040816e09 "Red"]PIMPLE: iteration 1 MULES: Solving for alpha.N2liquid Liquid phase volume fraction = 0 Min(alpha.N2liquid) = 0 Min(alpha.N2gas) = 1 MULES: Solving for alpha.N2liquid Liquid phase volume fraction = 0 Min(alpha.N2liquid) = 0 Min(alpha.N2gas) = 1 diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 > FOAM Warning : From function void option::checkApplied() const in file fvOption/fvOption.C at line 120 Source solidificationMeltingSource1 defined for field T but never used > FOAM Warning : From function void option::checkApplied() const in file fvOption/fvOption.C at line 120 Source solidificationMeltingSource1 defined for field T but never used smoothSolver: Solving for Ux, Initial residual = 0.13588954, Final residual = 1.0310746e14, No Iterations 2 smoothSolver: Solving for Uy, Initial residual = 0.58552683, Final residual = 6.4076165e14, No Iterations 2 smoothSolver: Solving for T, Initial residual = 0.13594691, Final residual = 1.7317232e10, No Iterations 2 min(T) 300 max(T) = 300.33976 GAMG: Solving for p_rgh, Initial residual = 0.17584259, Final residual = 3.9993902e11, No Iterations 1 max(U) 10 min(p_rgh) 100000 GAMG: Solving for p_rgh, Initial residual = 0.00013956399, Final residual = 1.8270438e11, No Iterations 1 max(U) 10 min(p_rgh) 100000 GAMG: Solving for p_rgh, Initial residual = 2.3811297e07, Final residual = 1.8059967e11, No Iterations 1 max(U) 10 min(p_rgh) 100000 GAMGPCG: Solving for p_rgh, Initial residual = 4.4884261e10, Final residual = 4.4884261e10, No Iterations 0 max(U) 10 min(p_rgh) 100000 ExecutionTime = 10.53 s Courant Number mean: 1.0268911e07 max: 0.0008693571 deltaT = 1.6792752e09 Time = 4.281315975e09 PIMPLE: iteration 1 MULES: Solving for alpha.N2liquid Liquid phase volume fraction = 0 Min(alpha.N2liquid) = 0 Min(alpha.N2gas) = 1 MULES: Solving for alpha.N2liquid Liquid phase volume fraction = 0 Min(alpha.N2liquid) = 0 Min(alpha.N2gas) = 1 diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 smoothSolver: Solving for Ux, Initial residual = 0.095160283, Final residual = 1.7536634e14, No Iterations 2 smoothSolver: Solving for Uy, Initial residual = 0.6744119, Final residual = 1.3559478e13, No Iterations 2 smoothSolver: Solving for T, Initial residual = 0.078889661, Final residual = 8.5225492e11, No Iterations 2 min(T) 300 max(T) = 300.55591 GAMG: Solving for p_rgh, Initial residual = 0.088569436, Final residual = 1.7222934e11, No Iterations 1 max(U) 10 min(p_rgh) 100000 GAMG: Solving for p_rgh, Initial residual = 0.00011342716, Final residual = 1.0712451e11, No Iterations 1 max(U) 10 min(p_rgh) 100000 GAMG: Solving for p_rgh, Initial residual = 2.2675389e07, Final residual = 1.0576804e11, No Iterations 1 max(U) 10 min(p_rgh) 100000 GAMGPCG: Solving for p_rgh, Initial residual = 4.8130432e10, Final residual = 4.8130432e10, No Iterations 0 max(U) 10 min(p_rgh) 100000 ExecutionTime = 13.62 s Courant Number mean: 1.2547452e07 max: 0.0010467447 deltaT = 1.9941393e09 Time = 6.275455225e09 thank you in advance. Baris 

December 11, 2015, 11:25 

#8 
Senior Member

Hi,
According to the output you have posted, I guess it is your modified version of compressibleInterFoam, since at least neither in OpenFOAM 2.4.x, nor in OpenFOAM 3.0.x the solver does not have fvOptions functionality implemented (or maybe I did not search thorough enough). To answer your question I need to see the modifications. 

December 13, 2015, 19:18 

#9  
Senior Member
Baris (Heewa)
Join Date: Jan 2013
Location: Japan
Posts: 130
Rep Power: 12 
Quote:
In fact, there is no FvOptions Functionality in the compressibleInterFoam, but I added following lines into UEqn: Code:
fvVectorMatrix UEqn ( fvm::ddt(rho, U) + fvm::div(rhoPhi, U) + turbulence>divDevRhoReff(U) == fvOptions(rho, U) //added to use solidification model ); UEqn.relax(); fvOptions.constrain(UEqn); //added to use solidification model if (pimple.momentumPredictor()) { solve ( UEqn == fvc::reconstruct ( ( interface.surfaceTensionForce()  ghf*fvc::snGrad(rho)  fvc::snGrad(p_rgh) ) * mesh.magSf() ) ); fvOptions.correct(U); //added to use solidification model K = 0.5*magSqr(U); } Code:
#include "fvIOoptionList.H" // added to use fvOptions #include "createFvOptions.H" // added to use fvOptions Code:
I$(LIB_SRC)/fvOptions/lnInclude \ lfvOptions \ Thank you. Baris 

December 13, 2015, 20:36 

#10 
Senior Member
Baris (Heewa)
Join Date: Jan 2013
Location: Japan
Posts: 130
Rep Power: 12 
Hi Alex,
Ok I found the problem that I forgot to add the fvOptions for TEqn. then it works for now OK without that warning message. thank you for replies. Baris 

January 8, 2016, 12:32 

#11 
New Member
Paul
Join Date: May 2012
Posts: 23
Rep Power: 12 
@Baris: Could you post the code for TEqn with the fvOptions that enable the solver to work properly?


January 11, 2016, 03:29 

#12 
Senior Member
Baris (Heewa)
Join Date: Jan 2013
Location: Japan
Posts: 130
Rep Power: 12 
Hi Paul,
It is totally same with U equation which i post above. Just change U parameter with T. BR 

February 22, 2016, 14:19 

#13 
Member
Alex Jarosch
Join Date: Dec 2015
Location: Austria
Posts: 32
Rep Power: 9 
@pmdelgado2: Dear Paul,
Did you work out how shipman has modified the Teqn.H? I'm working on the same problem and would appreciate help. Best regards, Alex 

February 23, 2016, 11:21 

#14 
Member
Alex Jarosch
Join Date: Dec 2015
Location: Austria
Posts: 32
Rep Power: 9 
Dear all,
I have also now modified the compressibleInterFoam solver according to this thread. When it is fully working, I will post the solver here. However I am currently stuggling to run a test case, based on the depthCharge2D case. Introducing a porous area works without a problem, so the fvOptions functionality must work in principle. However when I set my fvOptions to model with solidificationMeltingSource as such Code:
/** C++ **\  =========    \\ / F ield  OpenFOAM: The Open Source CFD Toolbox   \\ / O peration  Version: 3.0.0   \\ / A nd  Web: www.OpenFOAM.org   \\/ M anipulation   \**/ FoamFile { version 2.0; format ascii; class dictionary; location "constant"; object fvOptions; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // ice1 { type solidificationMeltingSource; active yes; solidificationMeltingSourceCoeffs { selectionMode cellZone; cellZone ice; Tmelt 273.15; L 334000; thermoMode thermo; beta 50e6; rhoRef 800; } } // ************************************************************************* // Code:
Creating finite volume options from "constant/fvOptions" Selecting finite volume options model type solidificationMeltingSource Source: ice1  selecting cells using cellZone ice  selected 6400 cell(s) with volume 0.2 > FOAM FATAL ERROR: Not implemented From function twoPhaseMixtureThermo::he() const in file twoPhaseMixtureThermo.H at line 132. FOAM aborting #0 Foam::error::printStack(Foam::Ostream&) at ??:? #1 Foam::error::abort() at ??:? #2 Foam::twoPhaseMixtureThermo::he() const at ??:? #3 Foam::fv::solidificationMeltingSource::solidificationMeltingSource(Foam::word const&, Foam::word const&, Foam::dictionary const&, Foam::fvMesh const&) at ??:? #4 Foam::fv::option::adddictionaryConstructorToTable<Foam::fv::solidificationMeltingSource>::New(Foam::word const&, Foam::word const&, Foam::dictionary const&, Foam::fvMesh const&) at ??:? #5 Foam::fv::option::New(Foam::word const&, Foam::dictionary const&, Foam::fvMesh const&) at ??:? #6 Foam::fv::optionList::reset(Foam::dictionary const&) at ??:? #7 Foam::fv::optionList::optionList(Foam::fvMesh const&, Foam::dictionary const&) at ??:? #8 Foam::fv::IOoptionList::IOoptionList(Foam::fvMesh const&) at ??:? #9 ? at ??:? #10 __libc_start_main in "/lib/x86_64linuxgnu/libc.so.6" #11 ? at ??:? Aborted Any help at this point is highly appreciated and please do let me know if you need more info from my side to work on that. Best regards, Alex 

February 23, 2016, 16:00 

#15 
New Member
Paul
Join Date: May 2012
Posts: 23
Rep Power: 12 
@Alexj: I suspect the fvOption is inherently assuming that the flow model is purely incompressible. Most likely, you will have to edit the source code pertaining to solidificaionMeltingSource to get it to work right.
I'm curious though... what exactly do you mean when you say "introducing a porous area works without a problem". How did you come to this conclusion? What verification tests could you have possible run if the solver doesn't run at all? 

February 23, 2016, 16:33 

#16 
Member
Alex Jarosch
Join Date: Dec 2015
Location: Austria
Posts: 32
Rep Power: 9 
@pmdelgado2: thanks for the hint.
I came to the conclusion that fvOptions must work in principle as I was able to run the case I have set up with an explicit porosity source in my fvOptions: Code:
porosity1 { type explicitPorositySource; active yes; explicitPorositySourceCoeffs { selectionMode cellZone; cellZone ice; type DarcyForchheimer; DarcyForchheimerCoeffs { d (7e5 1000 1000); f (0 0 0); coordinateSystem { type cartesian; origin (0 0 0); coordinateRotation { type axesRotation; e1 (0.70710678 0.70710678 0); e3 (0 0 1); } } } } } 

February 23, 2016, 19:22 

#17 
Senior Member
Baris (Heewa)
Join Date: Jan 2013
Location: Japan
Posts: 130
Rep Power: 12 
Hi Alex,
Can you post T and U eqns here. I feel that you didnt add fvOptions into TEqn to use it. Baris 

February 24, 2016, 05:35 
compressibleInterFoam working

#18 
Member
Alex Jarosch
Join Date: Dec 2015
Location: Austria
Posts: 32
Rep Power: 9 
Hi Baris,
thanks for the hint. You are right, I have forgotten to edit the T.eqn. Darn my mistake. Now the solver runs. But of course as there is not really a thermo object in the compressibleInterFoam, similar to buoyantBoussinesqPimpleFoam, I have to set up my fvOptions to use the thermoMode "lookup" as you have been doing all along up in post #7 and which has been pointed out above in post #2 by Alexey as well. Now my solver works. Here are the modifications for reference. UEqn.H: Code:
fvVectorMatrix UEqn ( fvm::ddt(rho, U) + fvm::div(rhoPhi, U) + turbulence>divDevRhoReff(U) == fvOptions(rho, U) ); UEqn.relax(); fvOptions.constrain(UEqn); if (pimple.momentumPredictor()) { solve ( UEqn == fvc::reconstruct ( ( interface.surfaceTensionForce()  ghf*fvc::snGrad(rho)  fvc::snGrad(p_rgh) ) * mesh.magSf() ) ); fvOptions.correct(U); K = 0.5*magSqr(U); } Code:
{ fvScalarMatrix TEqn ( fvm::ddt(rho, T) + fvm::div(rhoPhi, T)  fvm::laplacian(mixture.alphaEff(turbulence>mut()), T) + ( fvc::div(fvc::absolute(phi, U), p) + fvc::ddt(rho, K) + fvc::div(rhoPhi, K) ) *( alpha1/mixture.thermo1().Cv() + alpha2/mixture.thermo2().Cv() ) == fvOptions(rho, T) ); TEqn.relax(); fvOptions.constrain(TEqn); TEqn.solve(); mixture.correct(); fvOptions.correct(T); Info<< "min(T) " << min(T).value() << endl; } Code:
EXE_INC = \ ItwoPhaseMixtureThermo \ I$(LIB_SRC)/transportModels/compressible/lnInclude \ I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ I$(LIB_SRC)/transportModels/twoPhaseMixture/lnInclude \ I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \ I$(LIB_SRC)/finiteVolume/lnInclude \ I$(LIB_SRC)/meshTools/lnInclude \ I$(LIB_SRC)/fvOptions/lnInclude EXE_LIBS = \ ltwoPhaseMixtureThermo \ lcompressibleTransportModels \ lfluidThermophysicalModels \ lspecie \ ltwoPhaseMixture \ ltwoPhaseProperties \ linterfaceProperties \ lturbulenceModels \ lcompressibleTurbulenceModels \ lfiniteVolume \ lmeshTools \ lfvOptions Code:
myCompressibleInterFoam.C EXE = $(FOAM_USER_APPBIN)/myCompressibleInterFoam Here is my working, but not physically very correct fvOptions file: Code:
/** C++ **\  =========    \\ / F ield  OpenFOAM: The Open Source CFD Toolbox   \\ / O peration  Version: 3.0.0   \\ / A nd  Web: www.OpenFOAM.org   \\/ M anipulation   \**/ FoamFile { version 2.0; format ascii; class dictionary; location "constant"; object fvOptions; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // ice1 { type solidificationMeltingSource; active yes; solidificationMeltingSourceCoeffs { selectionMode cellZone; cellZone ice; Tmelt 273.15; L 334000; thermoMode lookup; beta 207e6; rhoRef 913; Cu 1.0e+05; q 1.0e06; CpName CpRef; CpRef 4195.0; } } } // ************************************************************************* // Again, thanks for your input Baris, best regards, Alex 

July 11, 2016, 10:41 

#19 
Member
Nicklas Linder
Join Date: Jul 2012
Location: Germany
Posts: 35
Rep Power: 12 
Hi all,
thanks for sharing your thoughts and modifications here.. I would like to know about your impression of the stability of the solver. The cases I set up are running, but from my point of you, it is kind of unstable. It does not diverge, but sometimes the minimum temperature drops unphysically low and the velocities rise. Do you restrict the solid.meltsource to the fluid where alpha=1 or do you apply it to the whole field? Best 

May 24, 2017, 11:01 
SolidificationMeltingSource incompressible

#20  
New Member
Farinha
Join Date: Mar 2017
Posts: 1
Rep Power: 0 
Quote:
I've been trying to setup this source term for the buoyantBoussinesqPimple Foam solver. I'm doing exactly what alexeym is saying here, but the fvOption stops the simulation due to the lack of a volScalarField for Cp. I wonder if editing the createFields.H file to create a field for Cp would do the trick... Does anyone know if this source term was coded solely for compressible? I mean, is there a way to set it up without editing the solver or the SMS.C file? Thanks 

Tags 
fvoptions 
Thread Tools  Search this Thread 
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
[Other] engineFoam new mesh problem  ayhan515  OpenFOAM Meshing & Mesh Conversion  5  August 10, 2015 08:45 
UDF compiling problem  Wouter  Fluent UDF and Scheme Programming  6  June 6, 2012 04:43 
Gambit  meshing over airfoil wrapping (?) problem  JFDC  FLUENT  1  July 11, 2011 05:59 
natural convection problem for a CHT problem  SeHee  CFX  2  June 10, 2007 06:29 
Adiabatic and Rotating wall (Convection problem)  ParodDav  CFX  5  April 29, 2007 19:13 