CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (http://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   access boundary field from inside BC (http://www.cfd-online.com/Forums/openfoam-programming-development/73238-access-boundary-field-inside-bc.html)

mabinty March 2, 2010 16:43

access boundary field from inside BC
 
Hi all!

I implemented a radiation model in the chtMultiRegionFoam solver. Now I have to modify the solidWallMixedTemperature BC (solvers/heatTransfer/chtMultiRegionFoam/derivedFvPatchFields/solidWallMixedTemperatureCoupled) to account for radiation at the fluid_solid interface. There I need the total radiative heat flux Qr at the wall, calculated by the radiation model (here fvDOM). I tried:

Code:

scalarField Qrad;

if (findIndex(props.fluidRegionNames(), myRegion.name()) != -1)
    {
        Qrad = this->patch().lookupPatchField<volScalarField, scalar>(Qr);
    }

The code compiles, and when I run the solver I get the following error:

Code:

--> FOAM FATAL ERROR:

    request for volScalarField  from objectRegistry air failed
    available objects of type volScalarField are

27
(
aLambda_0
a
ILambda_0_0
psi
DpDt
K
Qr0
h
I1
E
rho
Qr1
Cp
psi_0
G
ILambda_1_0
alpha
rho_0
p
T
Qr
I0
pow3(T)
p_0
e
bLambda_0
mu
)


    From function objectRegistry::lookupObject<Type>(const word&) const
    in file /home/aa/OpenFOAM/OpenFOAM-1.6.x/src/OpenFOAM/lnInclude/objectRegistryTemplates.C at line 140.

FOAM aborting

#0  Foam::error::printStack(Foam::Ostream&) in "/home/aa/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/libOpenFOAM.so"
#1  Foam::error::abort() in "/home/aa/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/libOpenFOAM.so"
#2  Foam::Ostream& Foam::operator<< <Foam::error>(Foam::Ostream&, Foam::errorManip<Foam::error>) in "/home/aa/OpenFOAM/aa-1.6.x/applications/bin/linux64GccDPOpt/chtMultiRegionRadFoam"
#3  Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const& Foam::objectRegistry::lookupObject<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> >(Foam::word const&) const in "/home/aa/OpenFOAM/aa-1.6.x/applications/bin/linux64GccDPOpt/chtMultiRegionRadFoam"
#4  Foam::solidWallMixedTemperatureCoupledFvPatchScalarField::updateCoeffs() in "/home/aa/OpenFOAM/aa-1.6.x/applications/bin/linux64GccDPOpt/chtMultiRegionRadFoam"
#5  Foam::mixedFvPatchField<double>::evaluate(Foam::Pstream::commsTypes) in "/home/aa/OpenFOAM/aa-1.6.x/applications/bin/linux64GccDPOpt/chtMultiRegionRadFoam"
#6  Foam::mixedEnthalpyFvPatchScalarField::updateCoeffs() in "/home/aa/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/libbasicThermophysicalModels.so"
#7  Foam::fvMatrix<double>::fvMatrix(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&, Foam::dimensionSet const&) in "/home/aa/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/libradiation.so"
#8  Foam::tmp<Foam::fvMatrix<double> > Foam::fvm::Sp<double>(Foam::DimensionedField<double, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&) in "/home/aa/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/libradiation.so"
#9  Foam::radiation::radiationModel::Sh(Foam::basicThermo&) const in "/home/aa/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/libradiation.so"
#10  main in "/home/aa/OpenFOAM/aa-1.6.x/applications/bin/linux64GccDPOpt/chtMultiRegionRadFoam"
#11  __libc_start_main in "/lib/libc.so.6"
#12  _start at /build/buildd/glibc-2.9/csu/../sysdeps/x86_64/elf/start.S:116

I don t know why the request failed as the field I d like to access is mentioned in the list of the available objects.

Can somebody give me a hint on how to get Qr at the considered boundary??

Thx in advance,
Aram


All times are GMT -4. The time now is 18:29.