|
[Sponsors] |
regionCoupled BC, problems with reading from a dictionary |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
January 12, 2014, 11:27 |
regionCoupled BC, problems with reading from a dictionary
|
#1 |
New Member
Alicja M
Join Date: Mar 2009
Location: Erlangen, DE
Posts: 26
Rep Power: 17 |
Dear all,
first of all, I wish you a happy new year 2014! I tried to extend the boundary condition "regionCoupled" by the radiation term. I added two new entries to the field file "T", boundary field part, namely "Qr" and "QrNbr". Furthermore, I extended the constructors of the class "energyRegionCoupledFvPatchScalarField" to read the two terms "Qr" and "QrNbr": - regionRadCoupled.H Code:
// Constructors //- Construct from patch and internal field energyRegionRadCoupledFvPatchScalarField ( const fvPatch&, const DimensionedField<scalar, volMesh>& ); //- Construct from patch, internal field and dictionary energyRegionRadCoupledFvPatchScalarField ( const fvPatch&, const DimensionedField<scalar, volMesh>&, const dictionary& ); Code:
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // default constructor Foam::energyRegionRadCoupledFvPatchScalarField:: energyRegionRadCoupledFvPatchScalarField ( const fvPatch& p, const DimensionedField<scalar, volMesh>& iF ) : coupledFvPatchField<scalar>(p, iF), regionCoupledPatch_(refCast<const regionCoupledBaseFvPatch>(p)), method_(UNDEFINED), nbrThermoPtr_(NULL), thermoPtr_(NULL), QrNbrName_("undefined-QrNbr"), QrName_("undefined-Qr") {} // dict constructor Foam::energyRegionRadCoupledFvPatchScalarField:: energyRegionRadCoupledFvPatchScalarField ( const fvPatch& p, const DimensionedField<scalar, volMesh>& iF, const dictionary& dict ) : coupledFvPatchField<scalar>(p, iF, dict), regionCoupledPatch_(refCast<const regionCoupledBaseFvPatch>(p)), method_(UNDEFINED), nbrThermoPtr_(NULL), thermoPtr_(NULL), QrNbrName_(dict.lookup("QrNbr")), QrName_(dict.lookup("Qr")) { if (!isA<regionCoupledBase>(this->patch().patch())) { FatalErrorIn ( "energyRegionRadCoupledFvPatchScalarField::" "energyRegionRadCoupledFvPatchScalarField\n" "(\n" " const fvPatch& p,\n" " const DimensionedField<scalar, volMesh>& iF,\n" " const dictionary& dict\n" ")\n" ) << "\n patch type '" << p.type() << "' not type '" << regionCoupledBase::typeName << "'" << "\n for patch " << p.name() << " of field " << dimensionedInternalField().name() << " in file " << dimensionedInternalField().objectPath() << exit(FatalError); } } Code:
--> FOAM FATAL ERROR: request for volScalarField undefined-Qr from objectRegistry liquid failed available objects of type volScalarField are 14 ( thermo:mu thermo:psi K h rho p_rgh dpdt gh rhoPrevIter p T thermo:rho p_rghPrevIter thermo:alpha ) From function objectRegistry::lookupObject<Type>(const word&) const in file /home/alkers/OpenFOAM/OpenFOAM-2.2.x/src/OpenFOAM/lnInclude/objectRegistryTemplates.C at line 164. FOAM aborting Does anybody know the reason why two instances of the class "energyRegionCoupledFvPatchScalarField" are created? Does anybody have an idea how I can get the two terms "Qr" and "QrNbr" from the field file? Any hints, ideas, ... are appreciate! Thanks! Best regards, Ala |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Cht tutorial in 15 | braennstroem | OpenFOAM Running, Solving & CFD | 197 | June 10, 2015 03:02 |
Defining "cyclic" B.C. problem | maysmech | OpenFOAM | 20 | March 14, 2011 10:28 |
Cyclic B.C -interDyMFOAM-Gambit Mesh-Parallel | farhagim | OpenFOAM | 3 | March 12, 2011 23:29 |
Problems with OpenFoaminterFoam and ACE | dingo1234 | OpenFOAM Running, Solving & CFD | 0 | January 6, 2009 09:08 |
FoamX error aachenBomb case | Ervin Adorean (Adorean) | OpenFOAM Pre-Processing | 13 | March 7, 2005 03:50 |