access field in BC condition
Two other links may be interesting
value of previous time step
objectRegistry::lookupObject<scalar>
value of previous time step
objectRegistry::lookupObject<scalar>
Quote:
How can a field defined in the solver code be accessed from within the code of a boundary condition?
As explained here http://www.cfd-online.com/OpenFOAM_D...tml?1133622442, I'm trying to add Johnson and Jackson's BCs to the twoPhaseEulerFoam solver, but I can't have access to the solver fields. I get the error:
/*---------------------------------------------------------------------------*\
| ========= | |
| \ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \ / O peration | Version: 1.2 |
| \ / A nd | Web: http://www.openfoam.org |
| \/ M anipulation | |
\*---------------------------------------------------------------------------*/
Exec : twoPhaseEulerFoam . Rhodes2D
Date : Dec 05 2005
Time : 21:06:15
Host : dimension4400
PID : 13204
Root : /home/alberto/OpenFOAM/alberto-1.2/run/FluidBeds
Case : Rhodes2D
Nprocs : 1
Create time
Create mesh for time = 0
Reading environmentalProperties
Reading transportProperties
--> FOAM FATAL ERROR :
request for volScalarField alpha from objectRegistry region0 failed
available objects of type volScalarField are
0
(
)
From function objectRegistry::lookupObject<type>(const word&) const
in file /home/dm2/henry/OpenFOAM/OpenFOAM-1.2/src/OpenFOAM/lnInclude/objectRegistryTempl ates.C at line 122.
FOAM aborting
I try to read the alpha field as follows:
const fvPatchField<scalar>& alpha = lookupPatchField<volScalarField,
scalar >
(
"alpha"
);
Also, how can I have access to the kineticTheoryProperties dictionary from the BC code? I get an error message which tells me the dictionary can't be found if I try to read from it.
Thanks in advance,
Alberto
As explained here http://www.cfd-online.com/OpenFOAM_D...tml?1133622442, I'm trying to add Johnson and Jackson's BCs to the twoPhaseEulerFoam solver, but I can't have access to the solver fields. I get the error:
/*---------------------------------------------------------------------------*\
| ========= | |
| \ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \ / O peration | Version: 1.2 |
| \ / A nd | Web: http://www.openfoam.org |
| \/ M anipulation | |
\*---------------------------------------------------------------------------*/
Exec : twoPhaseEulerFoam . Rhodes2D
Date : Dec 05 2005
Time : 21:06:15
Host : dimension4400
PID : 13204
Root : /home/alberto/OpenFOAM/alberto-1.2/run/FluidBeds
Case : Rhodes2D
Nprocs : 1
Create time
Create mesh for time = 0
Reading environmentalProperties
Reading transportProperties
--> FOAM FATAL ERROR :
request for volScalarField alpha from objectRegistry region0 failed
available objects of type volScalarField are
0
(
)
From function objectRegistry::lookupObject<type>(const word&) const
in file /home/dm2/henry/OpenFOAM/OpenFOAM-1.2/src/OpenFOAM/lnInclude/objectRegistryTempl ates.C at line 122.
FOAM aborting
I try to read the alpha field as follows:
const fvPatchField<scalar>& alpha = lookupPatchField<volScalarField,
scalar >
(
"alpha"
);
Also, how can I have access to the kineticTheoryProperties dictionary from the BC code? I get an error message which tells me the dictionary can't be found if I try to read from it.
Thanks in advance,
Alberto
Total Comments 0