CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   cht+interCondensatingEvaporatingFoam (https://www.cfd-online.com/Forums/openfoam-solving/230007-cht-intercondensatingevaporatingfoam.html)

wanghongjie September 3, 2020 09:38

cht+interCondensatingEvaporatingFoam
 
Hi, I am new to OF. I coupled chtMultiRegionFoam with the modified interCondensatingEvaporatingFoam, the solver compiles without problems (just judging from the compiled results), but once the temperature solves, there will be an error. I put up my TEqn.H and 0/T, please help me see where the problem is.

0/BASE/T

dimensions [0 0 0 1 0 0 0];
internalField uniform 0;
boundaryField
{
SJUERE
{
type zeroGradient;
}
SFRONTANDBACK
{
type empty;
}
HEAT
{
type fixedGradient;
gradient uniform 50;
}
BASE_FLUID
{
type compressible::turbulentTemperatureCoupledBaffleMix ed;
value $internalField;
Tnbr T;
kappaMethod solidThermo;
}
}

TEqn.H
{
Info<<"10"<<endl;
volScalarField& T = thermo->T();
Info<<"11"<<endl;
tmp<volScalarField> tcp(thermo->Cp());
const volScalarField& cp = tcp();
Info<<"12"<<endl;
const dimensionedScalar Cp1 = thermo->Cp1();
const dimensionedScalar Cp2 = thermo->Cp2();
Info<<"13"<<endl;
rhoCp = rho*cp;
Info<<"14"<<endl;
kappaEff = thermo->kappa() + rho*cp*turbulence.nut()/Prt;
Info<<"15"<<endl;
const surfaceScalarField rhoCpPhi
(
"rhoCpPhi",
rhoPhi*(Cp1 - Cp2) + phi*rho2*Cp2
);
Info<<"16"<<endl;
Pair<tmp<volScalarField>> vDotAlphal = mixture.mDot();
Info<<"17"<<endl;
fvScalarMatrix TEqn
(
fvm::ddt(rhoCp, T)
+ fvm::div(rhoCpPhi, T)
- fvm::Sp(fvc::ddt(rhoCp) + fvc::div(rhoCpPhi), T)
- fvm::laplacian(kappaEff, T)
+ mixture.TSource()
);

Info<<"18"<<endl;
TEqn.relax();
TEqn.solve(mesh.solver(he.select(finalIter)));
thermo->correct();

Info<< "min/max(T) = " << min(T).value() << ", "
<< max(T).value() <<endl;
}

Error:
#0 Foam::error:rintStack(Foam::Ostream&) at ??:?
#1 Foam::sigSegv::sigHandler(int) at ??:?
#2 ? in /lib/x86_64-linux-gnu/libpthread.so.0
#3 Foam::mapDistributeBase::mapDistributeBase(Foam::U List<int> const&, Foam::UList<int> const&) at ??:?
#4 Foam::mapDistribute::mapDistribute(Foam::UList<int > const&, Foam::UList<int> const&) at ??:?
#5 Foam::mappedPatchBase::calcMapping() const at ??:?
#6 Foam::mappedPatchBase::map() const at ??:?
#7 void Foam::mappedPatchBase::distribute<double>(Foam::Li st<double>&) const at ??:?
#8 Foam::compressible::turbulentTemperatureCoupledBaf fleMixedFvPatchScalarField::updateCoeffs() at ??:?
#9 Foam::fvMatrix<double>::fvMatrix(Foam::GeometricFi eld<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::dimensionSet const&) in ~/OpenFOAM/OpenFOAM-v2006/platforms/linux64GccDPInt32Opt/bin/chtConEvaFoam
#10 Foam::temperaturePhaseChangeTwoPhaseMixtures::cons tant::TSource() const at ??:?
#11 ? in ~/OpenFOAM/OpenFOAM-v2006/platforms/linux64GccDPInt32Opt/bin/chtConEvaFoam
#12 __libc_start_main in /lib/x86_64-linux-gnu/libc.so.6
#13 ? in ~/OpenFOAM/OpenFOAM-v2006/platforms/linux64GccDPInt32Opt/bin/chtConEvaFoam
Segmentation fault (core dumped)

alexio97 March 22, 2021 03:54

hello wanghongjie.

I was trying to compile cht foam and interCondensatingEvaporatingfoam together but I failed. Can you give me an advice for it..? If you can give me the solver, it will be a great help.
Also I can help you with dealing the error that occurred by revising your solver.


Thanks,
john

Henning86 January 17, 2022 04:05

the Library Twophase Flow might help
 
the Library Twophase Flow might help


https://github.com/DLR-RY/twophaseflow


All times are GMT -4. The time now is 15:52.