CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   chtmultiregionsimplefoam - problem with the solid region (http://www.cfd-online.com/Forums/openfoam/105788-chtmultiregionsimplefoam-problem-solid-region.html)

thomas030 August 9, 2012 03:28

chtmultiregionsimplefoam - problem with the solid region
 
Hello,

I try to model a block with two fluid regions and one solid heat source as test case. I ran the multiRegionHeaterRadiation tutorial and it works. Now I try to understand how the solver works and for that I rebuild the described testcase. I work with version 2.1.1.

In the first Time step I get an error message for my solid region. The setup for the solid is the same as is the tutorial case.

Time = 1


Solving for fluid region volume_1
DILUPBiCG: Solving for Ux, Initial residual = 1, Final residual = 0.02505913, No Iterations 1
DILUPBiCG: Solving for Uy, Initial residual = 1, Final residual = 0.03564643, No Iterations 1
DILUPBiCG: Solving for Uz, Initial residual = 1, Final residual = 0.0262261, No Iterations 1
DILUPBiCG: Solving for h, Initial residual = 1, Final residual = 0.05032147, No Iterations 2

Decomposing C matrix...

LU Back substitute C matrix..
Min/max T:299.8731 300.0793
GAMG: Solving for p_rgh, Initial residual = 0.9244711, Final residual = 0.004468303, No Iterations 5
time step continuity errors : sum local = 0.6615856, global = -4.182891e-17, cumulative = -4.182891e-17
Min/max rho:1.158317 1.159113

Solving for fluid region volume_2
DILUPBiCG: Solving for Ux, Initial residual = 1, Final residual = 0.0254788, No Iterations 1
DILUPBiCG: Solving for Uy, Initial residual = 1, Final residual = 0.03565059, No Iterations 1
DILUPBiCG: Solving for Uz, Initial residual = 1, Final residual = 0.02496372, No Iterations 1
DILUPBiCG: Solving for h, Initial residual = 1, Final residual = 0.05084451, No Iterations 2

Decomposing C matrix...

LU Back substitute C matrix..
Min/max T:299.8266 300.0985
GAMG: Solving for p_rgh, Initial residual = 0.8836019, Final residual = 0.003833346, No Iterations 5
time step continuity errors : sum local = 0.605208, global = 4.839946e-18, cumulative = -3.698896e-17
Min/max rho:1.158242 1.159293

Solving for solid region heater


--> FOAM FATAL ERROR:
Attempt to cast type zeroGradient to type compressible::turbulentTemperatureRadCoupledMixed

From function refCast<To>(From&)
in file /usr/local/OpenFOAM/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude/typeInfo.H at line 114.

FOAM aborting

#0 Foam::error::printStack(Foam::Ostream&) in "/usr/local/OpenFOAM/OpenFOAM-2.1.1/platforms/linux64Gcc44DPOpt/lib/libOpenFOAM.so"
#1 Foam::error::abort() in "/usr/local/OpenFOAM/OpenFOAM-2.1.1/platforms/linux64Gcc44DPOpt/lib/libOpenFOAM.so"
#2 Foam::Ostream& Foam::operator<< <Foam::error>(Foam::Ostream&, Foam::errorManip<Foam::error>) in "/usr/local/OpenFOAM/OpenFOAM-2.1.1/platforms/linux64Gcc44DPOpt/bin/chtMultiRegionSimpleFoam"
#3 Foam::compressible::turbulentTemperatureRadCoupled MixedFvPatchScalarField::updateCoeffs() in "/usr/local/OpenFOAM/OpenFOAM-2.1.1/platforms/linux64Gcc44DPOpt/lib/libcompressibleTurbulenceModel.so"
#4 Foam::fvMatrix<double>::fvMatrix(Foam::GeometricFi eld<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::dimensionSet const&) in "/usr/local/OpenFOAM/OpenFOAM-2.1.1/platforms/linux64Gcc44DPOpt/bin/chtMultiRegionSimpleFoam"
#5 Foam::fv::gaussLaplacianScheme<double, double>::fvmLaplacianUncorrected(Foam::GeometricFi eld<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) in "/usr/local/OpenFOAM/OpenFOAM-2.1.1/platforms/linux64Gcc44DPOpt/lib/libfiniteVolume.so"
#6 Foam::fv::gaussLaplacianScheme<double, double>::fvmLaplacian(Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) in "/usr/local/OpenFOAM/OpenFOAM-2.1.1/platforms/linux64Gcc44DPOpt/lib/libfiniteVolume.so"
#7 Foam::fv::laplacianScheme<double, double>::fvmLaplacian(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) in "/usr/local/OpenFOAM/OpenFOAM-2.1.1/platforms/linux64Gcc44DPOpt/lib/libfiniteVolume.so"
#8 Foam::tmp<Foam::fvMatrix<double> > Foam::fvm::laplacian<double, double>(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::word const&) in "/usr/local/OpenFOAM/OpenFOAM-2.1.1/platforms/linux64Gcc44DPOpt/bin/chtMultiRegionSimpleFoam"
#9 Foam::tmp<Foam::fvMatrix<double> > Foam::fvm::laplacian<double, double>(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) in "/usr/local/OpenFOAM/OpenFOAM-2.1.1/platforms/linux64Gcc44DPOpt/bin/chtMultiRegionSimpleFoam"
#10 main in "/usr/local/OpenFOAM/OpenFOAM-2.1.1/platforms/linux64Gcc44DPOpt/bin/chtMultiRegionSimpleFoam"
#11 __libc_start_main in "/lib64/libc.so.6"
#12 Foam::regIOobject::writeObject(Foam::IOstream::str eamFormat, Foam::IOstream::versionNumber, Foam::IOstream::compressionType) const in "/usr/local/OpenFOAM/OpenFOAM-2.1.1/platforms/linux64Gcc44DPOpt/bin/chtMultiRegionSimpleFoam"

Has anybody an idea whats the problem here?

Thank you for your help.

Regards

Thomas

Aurelien Thinat August 9, 2012 04:06

Hi Thomas,

You should check the file "/constant/heater/polymesh/boundaries". I guess in this file it's assumed this boundary condition is "compressible::turbulentTemperatureRadCoupledMixed ", and in the file "0/heater/T" you forced a zeroGradient boundary condition.

You can't have 2 different BCs in those file. If you want a zeroGradient boundary condition, replace "compressible::turbulentTemperatureRadCoupledMixed " by "wall".

Aurélien

thomas030 August 9, 2012 04:57

Hi Aurélie,

thank you for you advice but it still does not work. The original BCs were not that what you expected but I changed them to what you suggested and also other combinations. It is still the same problem as before it does not matter what I change. The BC for my wall_heater is now ZeroGradient. Here are my

/constant/heater/polymesh/boundaries file
2
(
wall_heater
{
type zeroGradient;
nFaces 168;
startFace 1972;
}

heater_to_volume_1
{
type mappedWall;
nFaces 168;
startFace 2140;
sampleMode nearestPatchFace;
sampleRegion volume_1;
samplePatch volume_1_to_heater;
offsetMode uniform;
offset ( 0 0 0 );
}

)

0/heater/T - file

imensions [ 0 0 0 1 0 0 0 ];

internalField uniform 300;

boundaryField
{
wall_heater
{
type zeroGradient;
value uniform 300;
}
heater_to_volume_1
{
type compressible::turbulentTemperatureRadCoupledMixed;
value uniform 300;
Tnbr T;
K solidThermo;
QrNbr Qr;
Qr none;
KName none;
}
}

system/heater/changeDictonaryDict File

dictionaryReplacement
{
boundary
{
wall_heater
{
type zeroGradient;
}
}

T
{
internalField uniform 300;

boundaryField
{
".*"
{
type zeroGradient;
value uniform 300;
}

heater_to_volume_1
{
type compressible::turbulentTemperatureRadCoupledMixed;
Tnbr T;
K solidThermo;
QrNbr Qr;
Qr none;
KName none;
value uniform 300;
}


"heater_to_.*"
{
type compressible::turbulentTemperatureCoupledBaffleMix ed;
neighbourFieldName T;
K solidThermo;
KName none;
value uniform 300;
}
wall_heater
{
type zeroGradient;
value uniform 300;
}
}
}

Ypmma
{
internalField uniform 0.5;

boundaryField
{
".*"
{
type calculated;
value uniform 0.5;
}
}

}

Ychar
{
internalField uniform 0.5;

boundaryField
{
".*"
{
type calculated;
value uniform 0.5;
}
}
}

}

Do you have another idea what it is caused?

Regards

Thomas

Aurelien Thinat August 9, 2012 05:02

I'm not using radiations on my models using CHT, but you can try this :

2
(
wall_heater
{
type wall;
nFaces 168;
startFace 1972;
}

heater_to_volume_1
{
type mappedWall;
nFaces 168;
startFace 2140;
sampleMode nearestPatchFace;
sampleRegion volume_1;
samplePatch volume_1_to_heater;
offsetMode uniform;
offset ( 0 0 0 );
}

)



and for T in the 0 folder :

heater_to_volume_1
{
type compressible::turbulentTemperatureCoupledBaffleMix ed;
value uniform 300;
neighbourFieldName T;
K solidThermo;
KName none;
}

}

thomas030 August 9, 2012 07:38

Hi Aurélien,

the problem is still the same also with turbulentTemperatureCoupledBaffleMixed.



Solving for solid region heater


--> FOAM FATAL ERROR:
Attempt to cast type zeroGradient to type compressible::turbulentTemperatureCoupledBaffleMix ed

From function refCast<To>(From&)
in file /usr/local/OpenFOAM/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude/typeInfo.H at line 114.

FOAM aborting

I also experimented with the fields

value uniform 300;

and

value $internalField;

But the error is still the same, it seem as the solver did not come to the point to check the fields under type compressible::turbulentTemperatureCoupledBaffleMix ed.

Regards

Thomas

Aurelien Thinat August 9, 2012 07:46

Did you check the boundary "volume_1_to_heater" from the fluid zone ?

Copy paste the constant/volume_1/boundary and 0/volume_1/h files.

I'm right now using the boundary condition "compressible::turbulentTemperatureCoupledBaffleMi xed" without any problem...

thomas030 August 9, 2012 08:44

Hey

I checked the boundary "volume_1_to_heater" and it seems to be all right.

Am I right that you mean with the 0/volume_1/h files the files:
- faceAgglomeration
- G
- IDefault
- Qr
- viewFactorField.

I ran this case without Radiation and it works without the described problem. The solver stops by exceeded the maximum number of Iterations. But that is something different.

So I think the problem is caused by turning the Radiation on.

Regards

Aurelien Thinat August 9, 2012 08:55

Well, in fact I was speaking about T.

The problem you encounter is typically the kind of problem you have when the boundary conditions in the 0/ folder (p T U ....) don't match the kind of boundary you are using in the constant/ folder (patch, wall, couple, AMI...).

If all of the BCs are checked and match the different "boundary" files, I have no clue to solve this problem.

thomas030 August 9, 2012 09:04

Ok I fixed the problem.

I had a small but important spelling mistake in the component names. Located was it in the /system/volume_1/changeDictionaryDict file.


All times are GMT -4. The time now is 13:26.