atoof |
October 18, 2014 08:29 |
Dears,
Is it possible to apply relaxation factors for chemical reaction of species in YEqn.H of solver reactingFoam?
I'm working with OF2.1.x now.
The things I did:
I've defined a volScalarField in createFields;
Code:
volScalarField sYi
(
IOobject
(
"sYi",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE
),
mesh,
dimensionSet (1, -3, -1, 0, 0, 0, 0)
);
and in YEqn.H I've added the following
Code:
sYi = combustion->R(Yi);
sYi.relax();
fvScalarMatrix YiEqn
(
fvm::ddt(rho, Yi)
+ mvConvection->fvmDiv(phi, Yi)
// - fvm::laplacian(turbulence->muEff(), Yi)
- fvm::laplacian(diffCo, Yi)
==
// combustion->R(Yi)
sYi
);
but after compiling the following error appears:
Code:
In file included from reactingDymFoamModTrans.C:97:0:
YEqn.H: In function ‘int main(int, char**)’:
YEqn.H:24:35: error: no match for ‘operator=’ in ‘sYi = Foam::combustionModel::R((*(const volScalarField*)Yi))’
YEqn.H:24:35: note: candidates are:
In file included from /home/mohammad/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude/GeometricField.H:583:0,
from /home/mohammad/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude/GeometricScalarField.H:38,
from /home/mohammad/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude/GeometricFields.H:34,
from /home/mohammad/OpenFOAM/OpenFOAM-2.1.x/src/finiteVolume/lnInclude/volFields.H:37,
from /home/mohammad/OpenFOAM/OpenFOAM-2.1.x/src/finiteVolume/lnInclude/surfaceInterpolationScheme.C:30,
from /home/mohammad/OpenFOAM/OpenFOAM-2.1.x/src/finiteVolume/lnInclude/surfaceInterpolationScheme.H:234,
from /home/mohammad/OpenFOAM/OpenFOAM-2.1.x/src/finiteVolume/lnInclude/surfaceInterpolate.H:41,
from /home/mohammad/OpenFOAM/OpenFOAM-2.1.x/src/finiteVolume/lnInclude/fvc.H:39,
from /home/mohammad/OpenFOAM/OpenFOAM-2.1.x/src/finiteVolume/lnInclude/fvCFD.H:8,
from reactingDymFoamModTrans.C:32:
/home/mohammad/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude/GeometricField.C:1083:6: note: void Foam::GeometricField<Type, PatchField, GeoMesh>::operator=(const Foam::GeometricField<Type, PatchField, GeoMesh>&) [with Type = double; PatchField = Foam::fvPatchField; GeoMesh = Foam::volMesh]
/home/mohammad/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude/GeometricField.C:1083:6: note: no known conversion for argument 1 from ‘Foam::tmp<Foam::fvMatrix<double> >’ to ‘const Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&’
/home/mohammad/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude/GeometricField.C:1108:6: note: void Foam::GeometricField<Type, PatchField, GeoMesh>::operator=(const Foam::tmp<Foam::GeometricField<Type, PatchField, GeoMesh> >&) [with Type = double; PatchField = Foam::fvPatchField; GeoMesh = Foam::volMesh]
/home/mohammad/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude/GeometricField.C:1108:6: note: no known conversion for argument 1 from ‘Foam::tmp<Foam::fvMatrix<double> >’ to ‘const Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> >&’
/home/mohammad/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude/GeometricField.C:1144:6: note: void Foam::GeometricField<Type, PatchField, GeoMesh>::operator=(const Foam::dimensioned<Form>&) [with Type = double; PatchField = Foam::fvPatchField; GeoMesh = Foam::volMesh]
/home/mohammad/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude/GeometricField.C:1144:6: note: no known conversion for argument 1 from ‘Foam::tmp<Foam::fvMatrix<double> >’ to ‘const Foam::dimensioned<double>&’
In file included from reactingDymFoamModTrans.C:51:0:
/home/mohammad/OpenFOAM/OpenFOAM-2.1.x/src/finiteVolume/lnInclude/readTimeControls.H:38:8: warning: unused variable ‘maxDeltaT’ [-Wunused-variable]
make: *** [Make/linuxGccDPOpt/reactingDymFoamModTrans.o] Error 1
How can I remove the error?
Thank you in advance for any hint.
|