CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   problem in making a new solver!!! (http://www.cfd-online.com/Forums/openfoam-solving/107371-problem-making-new-solver.html)

adambarfi September 25, 2012 12:30

problem in making a new solver!!!
 
hi everybody,

I'm trying to define a new solver that can solve heat transfer of a viscoelastic fluid, but when I want to made it the following error appeared:

Code:

Making dependency list for source file BuoyantBoussinesqViscoelasticFluidFoam.C
could not open file singlePhaseTransportModel.H for source file BuoyantBoussinesqViscoelasticFluidFoam.C
could not open file RASModel.H for source file BuoyantBoussinesqViscoelasticFluidFoam.C
SOURCE=BuoyantBoussinesqViscoelasticFluidFoam.C ;  g++ -m32 -Dlinux -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -O3  -DNoRepository -ftemplate-depth-100 -I/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/finiteVolume/lnInclude -I/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/transportModels/viscoelastic/lnInclude -I/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/meshTools/lnInclude -IlnInclude -I. -I/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude -I/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OSspecific/POSIX/lnInclude  -fPIC -c $SOURCE -o Make/linuxGccDPOpt/BuoyantBoussinesqViscoelasticFluidFoam.o
BuoyantBoussinesqViscoelasticFluidFoam.C:38:39: fatal error: singlePhaseTransportModel.H: No such file or directory
compilation terminated.

anybody knows what should I do?

thanks

nimasam September 26, 2012 05:43

read error!
#include "singlePhaseTransportModel.H"

adambarfi September 26, 2012 06:20

thanks Nima,
yes, the Error refer to singlePhaseTransportModel.H but I cannot understand why OF display this error?do you know where is the problem?

ata September 26, 2012 07:19

Hi
You must set the path of the header in the options file in the make folder of your solver under the EXE_INC = \

wyldckat September 26, 2012 08:46

Greetings to all!

To complement the answers given, check the file "applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/Make/options" - online: https://github.com/OpenFOAM/OpenFOAM...m/Make/options

Best regards,
Bruno

adambarfi September 26, 2012 08:59

Ata and Bruno, Thank you so much

I changed the option file and the problem solved, but another errors appeared:

Code:

In file included from BuoyantBoussinesqViscoelasticFluidFoam.C:51:0:
createFields.H: In function ‘int main(int, char**)’:
createFields.H:20:6: error: ‘transportProperties’ was not declared in this scope
In file included from BuoyantBoussinesqViscoelasticFluidFoam.C:51:0:
createFields.H:91:29: error: no match for ‘operator-’ in ‘1.0e+0 - Foam::operator*(const Foam::dimensioned<double>&, const Foam::tmp<Foam::GeometricField<Type, PatchField, GeoMesh> >&) [with Type = Foam::Vector<double>, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh](((const Foam::tmp<Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> >&)((const Foam::tmp<Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> >*)(& Foam::operator-(const Foam::GeometricField<Type1, PatchField, GeoMesh>&, const Foam::dimensioned<Type>&) [with Form = double, Type = Foam::Vector<double>, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh, typename Foam::typeOfSum<Type, Form>::type = Foam::Vector<double>](((const Foam::dimensioned<double>&)((const Foam::dimensioned<double>*)(& TRef))))))))’
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/dimensionSet.H:255:29: note: candidates are: Foam::dimensionSet Foam::operator-(const Foam::dimensionSet&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/dimensionSet.H:263:29: note:                Foam::dimensionSet Foam::operator-(const Foam::dimensionSet&, const Foam::dimensionSet&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/dimensionedScalar.H:52:19: note:                Foam::dimensionedScalar Foam::operator-(const Foam::dimensionedScalar&, Foam::scalar)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/dimensionedScalar.H:53:19: note:                Foam::dimensionedScalar Foam::operator-(Foam::scalar, const Foam::dimensionedScalar&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/scalarField.H:78:1: note:                Foam::tmp<Foam::Field<double> > Foam::operator-(const Foam::scalar&, const Foam::UList<double>&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/scalarField.H:78:1: note:                Foam::tmp<Foam::Field<double> > Foam::operator-(const Foam::scalar&, const Foam::tmp<Foam::Field<double> >&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/scalarField.H:78:1: note:                Foam::tmp<Foam::Field<double> > Foam::operator-(const Foam::UList<double>&, const Foam::scalar&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/scalarField.H:78:1: note:                Foam::tmp<Foam::Field<double> > Foam::operator-(const Foam::tmp<Foam::Field<double> >&, const Foam::scalar&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/labelField.H:54:1: note:                Foam::tmp<Foam::Field<int> > Foam::operator-(const Foam::label&, const Foam::UList<int>&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/labelField.H:54:1: note:                Foam::tmp<Foam::Field<int> > Foam::operator-(const Foam::label&, const Foam::tmp<Foam::Field<int> >&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/labelField.H:54:1: note:                Foam::tmp<Foam::Field<int> > Foam::operator-(const Foam::UList<int>&, const Foam::label&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/labelField.H:54:1: note:                Foam::tmp<Foam::Field<int> > Foam::operator-(const Foam::tmp<Foam::Field<int> >&, const Foam::label&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/diagTensorField.H:61:1: note:                Foam::tmp<Foam::Field<Foam::Tensor<double> > > Foam::operator-(const Foam::UList<Foam::DiagTensor<double> >&, const Foam::UList<Foam::Tensor<double> >&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/diagTensorField.H:61:1: note:                Foam::tmp<Foam::Field<Foam::Tensor<double> > > Foam::operator-(const Foam::UList<Foam::DiagTensor<double> >&, const Foam::tmp<Foam::Field<Foam::Tensor<double> > >&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/diagTensorField.H:61:1: note:                Foam::tmp<Foam::Field<Foam::Tensor<double> > > Foam::operator-(const Foam::tmp<Foam::Field<Foam::DiagTensor<double> > >&, const Foam::UList<Foam::Tensor<double> >&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/diagTensorField.H:61:1: note:                Foam::tmp<Foam::Field<Foam::Tensor<double> > > Foam::operator-(const Foam::tmp<Foam::Field<Foam::DiagTensor<double> > >&, const Foam::tmp<Foam::Field<Foam::Tensor<double> > >&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/diagTensorField.H:64:1: note:                Foam::tmp<Foam::Field<Foam::Tensor<double> > > Foam::operator-(const Foam::diagTensor&, const Foam::UList<Foam::Tensor<double> >&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/diagTensorField.H:64:1: note:                Foam::tmp<Foam::Field<Foam::Tensor<double> > > Foam::operator-(const Foam::diagTensor&, const Foam::tmp<Foam::Field<Foam::Tensor<double> > >&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/diagTensorField.H:64:1: note:                Foam::tmp<Foam::Field<Foam::Tensor<double> > > Foam::operator-(const Foam::UList<Foam::DiagTensor<double> >&, const Foam::tensor&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/diagTensorField.H:64:1: note:                Foam::tmp<Foam::Field<Foam::Tensor<double> > > Foam::operator-(const Foam::tmp<Foam::Field<Foam::DiagTensor<double> > >&, const Foam::tensor&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/vectorTensorTransformI.H:283:36: note:                Foam::vectorTensorTransform Foam::operator-(const Foam::vectorTensorTransform&, const Foam::vector&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/quaternionI.H:273:25: note:                Foam::quaternion Foam::operator-(const Foam::quaternion&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/quaternionI.H:279:25: note:                Foam::quaternion Foam::operator-(const Foam::quaternion&, const Foam::quaternion&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/septernionI.H:190:25: note:                Foam::septernion Foam::operator-(const Foam::septernion&, const Foam::vector&)
createFields.H:110:29: error: ‘g’ was not declared in this scope
createFields.H:116:9: error: redeclaration of ‘Foam::volScalarField p’
createFields.H:7:9: error: ‘Foam::volScalarField p’ previously declared here
createFields.H:126:11: error: redeclaration of ‘Foam::label pRefCell’
createFields.H:77:11: error: ‘Foam::label pRefCell’ previously declared here
createFields.H:127:12: error: redeclaration of ‘Foam::scalar pRefValue’
createFields.H:78:12: error: ‘Foam::scalar pRefValue’ previously declared here
In file included from BuoyantBoussinesqViscoelasticFluidFoam.C:80:0:
TEqn.H:12:5: error: no matching function for call to ‘Foam::fvMatrix<double>::fvMatrix(Foam::tmp<Foam::fvMatrix<Foam::Vector<double> > >)’
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/finiteVolume/lnInclude/fvMatrix.C:418:1: note: candidates are: Foam::fvMatrix<Type>::fvMatrix(const Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>&, Foam::Istream&) [with Type = double]
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/finiteVolume/lnInclude/fvMatrix.C:361:1: note:                Foam::fvMatrix<Type>::fvMatrix(const Foam::tmp<Foam::fvMatrix<Type> >&) [with Type = double]
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/finiteVolume/lnInclude/fvMatrix.C:330:1: note:                Foam::fvMatrix<Type>::fvMatrix(const Foam::fvMatrix<Type>&) [with Type = double]
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/finiteVolume/lnInclude/fvMatrix.C:273:1: note:                Foam::fvMatrix<Type>::fvMatrix(const Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>&, const Foam::dimensionSet&) [with Type = double]
TEqn.H:17:32: error: no match for ‘operator-’ in ‘1.0e+0 - Foam::operator*(const Foam::dimensioned<double>&, const Foam::tmp<Foam::GeometricField<Type, PatchField, GeoMesh> >&) [with Type = Foam::Vector<double>, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh](((const Foam::tmp<Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> >&)((const Foam::tmp<Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> >*)(& Foam::operator-(const Foam::GeometricField<Type1, PatchField, GeoMesh>&, const Foam::dimensioned<Type>&) [with Form = double, Type = Foam::Vector<double>, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh, typename Foam::typeOfSum<Type, Form>::type = Foam::Vector<double>](((const Foam::dimensioned<double>&)((const Foam::dimensioned<double>*)(& TRef))))))))’
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/dimensionSet.H:255:29: note: candidates are: Foam::dimensionSet Foam::operator-(const Foam::dimensionSet&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/dimensionSet.H:263:29: note:                Foam::dimensionSet Foam::operator-(const Foam::dimensionSet&, const Foam::dimensionSet&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/dimensionedScalar.H:52:19: note:                Foam::dimensionedScalar Foam::operator-(const Foam::dimensionedScalar&, Foam::scalar)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/dimensionedScalar.H:53:19: note:                Foam::dimensionedScalar Foam::operator-(Foam::scalar, const Foam::dimensionedScalar&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/scalarField.H:78:1: note:                Foam::tmp<Foam::Field<double> > Foam::operator-(const Foam::scalar&, const Foam::UList<double>&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/scalarField.H:78:1: note:                Foam::tmp<Foam::Field<double> > Foam::operator-(const Foam::scalar&, const Foam::tmp<Foam::Field<double> >&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/scalarField.H:78:1: note:                Foam::tmp<Foam::Field<double> > Foam::operator-(const Foam::UList<double>&, const Foam::scalar&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/scalarField.H:78:1: note:                Foam::tmp<Foam::Field<double> > Foam::operator-(const Foam::tmp<Foam::Field<double> >&, const Foam::scalar&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/labelField.H:54:1: note:                Foam::tmp<Foam::Field<int> > Foam::operator-(const Foam::label&, const Foam::UList<int>&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/labelField.H:54:1: note:                Foam::tmp<Foam::Field<int> > Foam::operator-(const Foam::label&, const Foam::tmp<Foam::Field<int> >&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/labelField.H:54:1: note:                Foam::tmp<Foam::Field<int> > Foam::operator-(const Foam::UList<int>&, const Foam::label&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/labelField.H:54:1: note:                Foam::tmp<Foam::Field<int> > Foam::operator-(const Foam::tmp<Foam::Field<int> >&, const Foam::label&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/diagTensorField.H:61:1: note:                Foam::tmp<Foam::Field<Foam::Tensor<double> > > Foam::operator-(const Foam::UList<Foam::DiagTensor<double> >&, const Foam::UList<Foam::Tensor<double> >&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/diagTensorField.H:61:1: note:                Foam::tmp<Foam::Field<Foam::Tensor<double> > > Foam::operator-(const Foam::UList<Foam::DiagTensor<double> >&, const Foam::tmp<Foam::Field<Foam::Tensor<double> > >&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/diagTensorField.H:61:1: note:                Foam::tmp<Foam::Field<Foam::Tensor<double> > > Foam::operator-(const Foam::tmp<Foam::Field<Foam::DiagTensor<double> > >&, const Foam::UList<Foam::Tensor<double> >&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/diagTensorField.H:61:1: note:                Foam::tmp<Foam::Field<Foam::Tensor<double> > > Foam::operator-(const Foam::tmp<Foam::Field<Foam::DiagTensor<double> > >&, const Foam::tmp<Foam::Field<Foam::Tensor<double> > >&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/diagTensorField.H:64:1: note:                Foam::tmp<Foam::Field<Foam::Tensor<double> > > Foam::operator-(const Foam::diagTensor&, const Foam::UList<Foam::Tensor<double> >&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/diagTensorField.H:64:1: note:                Foam::tmp<Foam::Field<Foam::Tensor<double> > > Foam::operator-(const Foam::diagTensor&, const Foam::tmp<Foam::Field<Foam::Tensor<double> > >&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/diagTensorField.H:64:1: note:                Foam::tmp<Foam::Field<Foam::Tensor<double> > > Foam::operator-(const Foam::UList<Foam::DiagTensor<double> >&, const Foam::tensor&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/diagTensorField.H:64:1: note:                Foam::tmp<Foam::Field<Foam::Tensor<double> > > Foam::operator-(const Foam::tmp<Foam::Field<Foam::DiagTensor<double> > >&, const Foam::tensor&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/vectorTensorTransformI.H:283:36: note:                Foam::vectorTensorTransform Foam::operator-(const Foam::vectorTensorTransform&, const Foam::vector&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/quaternionI.H:273:25: note:                Foam::quaternion Foam::operator-(const Foam::quaternion&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/quaternionI.H:279:25: note:                Foam::quaternion Foam::operator-(const Foam::quaternion&, const Foam::quaternion&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/septernionI.H:190:25: note:                Foam::septernion Foam::operator-(const Foam::septernion&, const Foam::vector&)
BuoyantBoussinesqViscoelasticFluidFoam.C:145:9: error: no matching function for call to ‘Foam::fvMatrix<double>::fvMatrix(Foam::tmp<Foam::fvMatrix<Foam::Vector<double> > >)’
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/finiteVolume/lnInclude/fvMatrix.C:418:1: note: candidates are: Foam::fvMatrix<Type>::fvMatrix(const Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>&, Foam::Istream&) [with Type = double]
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/finiteVolume/lnInclude/fvMatrix.C:361:1: note:                Foam::fvMatrix<Type>::fvMatrix(const Foam::tmp<Foam::fvMatrix<Type> >&) [with Type = double]
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/finiteVolume/lnInclude/fvMatrix.C:330:1: note:                Foam::fvMatrix<Type>::fvMatrix(const Foam::fvMatrix<Type>&) [with Type = double]
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/finiteVolume/lnInclude/fvMatrix.C:273:1: note:                Foam::fvMatrix<Type>::fvMatrix(const Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>&, const Foam::dimensionSet&) [with Type = double]
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/finiteVolume/lnInclude/readPISOControls.H:3:15: warning: unused variable ‘nOuterCorr’
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/finiteVolume/lnInclude/readPISOControls.H:12:16: warning: unused variable ‘momentumPredictor’
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/finiteVolume/lnInclude/readPISOControls.H:15:16: warning: unused variable ‘transonic’
In file included from /home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/GeometricField.C:1270:0,
                from /home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/GeometricField.H:583,
                from /home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/GeometricScalarField.H:38,
                from /home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/GeometricFields.H:34,
                from /home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/finiteVolume/lnInclude/volFields.H:37,
                from /home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/finiteVolume/lnInclude/surfaceInterpolationScheme.C:30,
                from /home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/finiteVolume/lnInclude/surfaceInterpolationScheme.H:234,
                from /home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/finiteVolume/lnInclude/surfaceInterpolate.H:41,
                from /home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/finiteVolume/lnInclude/fvc.H:39,
                from /home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/finiteVolume/lnInclude/fvCFD.H:8,
                from BuoyantBoussinesqViscoelasticFluidFoam.C:36:
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/GeometricFieldFunctions.C: In function ‘void Foam::subtract(Foam::GeometricField<typename Foam::typeOfSum<Type, Form>::type, PatchField, GeoMesh>&, const Foam::GeometricField<Type1, PatchField, GeoMesh>&, const Foam::dimensioned<Type>&) [with Form = double, Type = Foam::Vector<double>, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh, typename Foam::typeOfSum<Type, Form>::type = Foam::Vector<double>]’:
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/GeometricFieldFunctions.C:951:1:  instantiated from ‘Foam::tmp<Foam::GeometricField<typename Foam::typeOfSum<Type, Form>::type, PatchField, GeoMesh> > Foam::operator-(const Foam::GeometricField<Type1, PatchField, GeoMesh>&, const Foam::dimensioned<Type>&) [with Form = double, Type = Foam::Vector<double>, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh, typename Foam::typeOfSum<Type, Form>::type = Foam::Vector<double>]’
createFields.H:91:25:  instantiated from here
.
.
.
make: *** [Make/linuxGccDPOpt/BuoyantBoussinesqViscoelasticFluidFoam.o] Error 1

I'm trying to add the Boussinesq assumption to viscoelasticFluidFoam. before I had added temperature to it successfully.

nimasam September 26, 2012 09:02

as i said before, read the error line:
1)redeclaration:
you define velocity twice! so omit one of them!!!!

2)you did not define the variable (object) transportproperties at all
so define an "IODictionary"

adambarfi September 26, 2012 09:07

Quote:

Originally Posted by nimasam (Post 383734)
as i said before, read the error line:
1)redeclaration:
you define velocity twice! so omit one of them!!!!

2)you did not define the variable (object) transportproperties at all
so define an "IODictionary"

you right, when I was editing my last post you reply it, thank you. I edit it.

adambarfi September 26, 2012 09:30

I defined a n IODictionary, the following errors appeared:
Code:

In file included from BuoyantBoussinesqViscoelasticFluidFoam.C:51:0:
createFields.H: In function ‘int main(int, char**)’:
createFields.H:46:5: error: ‘Foam::dictionary’ is an ambiguous base of ‘Foam::fvMesh’
In file included from BuoyantBoussinesqViscoelasticFluidFoam.C:51:0:
createFields.H:144:29: error: no match for ‘operator-’ in ‘1.0e+0 - Foam::operator*(const Foam::dimensioned<double>&, const Foam::tmp<Foam::GeometricField<Type, PatchField, GeoMesh> >&) [with Type = Foam::Vector<double>, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh](((const Foam::tmp<Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> >&)((const Foam::tmp<Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> >*)(& Foam::operator-(const Foam::GeometricField<Type1, PatchField, GeoMesh>&, const Foam::dimensioned<Type>&) [with Form = double, Type = Foam::Vector<double>, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh, typename Foam::typeOfSum<Type, Form>::type = Foam::Vector<double>](((const Foam::dimensioned<double>&)((const Foam::dimensioned<double>*)(& TRef))))))))’
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/dimensionSet.H:255:29: note: candidates are: Foam::dimensionSet Foam::operator-(const Foam::dimensionSet&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/dimensionSet.H:263:29: note:                Foam::dimensionSet Foam::operator-(const Foam::dimensionSet&, const Foam::dimensionSet&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/dimensionedScalar.H:52:19: note:                Foam::dimensionedScalar Foam::operator-(const Foam::dimensionedScalar&, Foam::scalar)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/dimensionedScalar.H:53:19: note:                Foam::dimensionedScalar Foam::operator-(Foam::scalar, const Foam::dimensionedScalar&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/scalarField.H:78:1: note:                Foam::tmp<Foam::Field<double> > Foam::operator-(const Foam::scalar&, const Foam::UList<double>&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/scalarField.H:78:1: note:                Foam::tmp<Foam::Field<double> > Foam::operator-(const Foam::scalar&, const Foam::tmp<Foam::Field<double> >&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/scalarField.H:78:1: note:                Foam::tmp<Foam::Field<double> > Foam::operator-(const Foam::UList<double>&, const Foam::scalar&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/scalarField.H:78:1: note:                Foam::tmp<Foam::Field<double> > Foam::operator-(const Foam::tmp<Foam::Field<double> >&, const Foam::scalar&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/labelField.H:54:1: note:                Foam::tmp<Foam::Field<int> > Foam::operator-(const Foam::label&, const Foam::UList<int>&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/labelField.H:54:1: note:                Foam::tmp<Foam::Field<int> > Foam::operator-(const Foam::label&, const Foam::tmp<Foam::Field<int> >&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/labelField.H:54:1: note:                Foam::tmp<Foam::Field<int> > Foam::operator-(const Foam::UList<int>&, const Foam::label&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/labelField.H:54:1: note:                Foam::tmp<Foam::Field<int> > Foam::operator-(const Foam::tmp<Foam::Field<int> >&, const Foam::label&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/diagTensorField.H:61:1: note:                Foam::tmp<Foam::Field<Foam::Tensor<double> > > Foam::operator-(const Foam::UList<Foam::DiagTensor<double> >&, const Foam::UList<Foam::Tensor<double> >&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/diagTensorField.H:61:1: note:                Foam::tmp<Foam::Field<Foam::Tensor<double> > > Foam::operator-(const Foam::UList<Foam::DiagTensor<double> >&, const Foam::tmp<Foam::Field<Foam::Tensor<double> > >&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/diagTensorField.H:61:1: note:                Foam::tmp<Foam::Field<Foam::Tensor<double> > > Foam::operator-(const Foam::tmp<Foam::Field<Foam::DiagTensor<double> > >&, const Foam::UList<Foam::Tensor<double> >&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/diagTensorField.H:61:1: note:                Foam::tmp<Foam::Field<Foam::Tensor<double> > > Foam::operator-(const Foam::tmp<Foam::Field<Foam::DiagTensor<double> > >&, const Foam::tmp<Foam::Field<Foam::Tensor<double> > >&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/diagTensorField.H:64:1: note:                Foam::tmp<Foam::Field<Foam::Tensor<double> > > Foam::operator-(const Foam::diagTensor&, const Foam::UList<Foam::Tensor<double> >&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/diagTensorField.H:64:1: note:                Foam::tmp<Foam::Field<Foam::Tensor<double> > > Foam::operator-(const Foam::diagTensor&, const Foam::tmp<Foam::Field<Foam::Tensor<double> > >&)
.
.
.
Foam::subtract(Foam::Field<Foam::Tensor<double> >&, const Foam::UList<Foam::DiagTensor<double> >&, const Foam::tensor&)
make: *** [Make/linuxGccDPOpt/BuoyantBoussinesqViscoelasticFluidFoam.o] Error 1.

again thank you

nimasam September 26, 2012 10:32

two errors:
line 64: error in definition of transportproperties,How did you define this variable?
line 144: i think here you add or abstract an scalar from a dimensionedScalar, its wrong
both type should be dimensioned or use function .value() to use only it's value

adambarfi September 26, 2012 15:10

Quote:

Originally Posted by nimasam (Post 383762)
two errors:
line 64: error in definition of transportproperties,How did you define this variable?
line 144: i think here you add or abstract an scalar from a dimensionedScalar, its wrong
both type should be dimensioned or use function .value() to use only it's value

Thanks Nima,
I edited the line 64. but I cant understand this error:
Code:

In file included from BuoyantBoussinesqViscoelasticFluidFoam.C:51:0:
createFields.H: In function ‘int main(int, char**)’:
createFields.H:144:29: error: no match for ‘operator-’ in ‘1.0e+0 - Foam::operator*(const Foam::dimensioned<double>&, const Foam::tmp<Foam::GeometricField<Type, PatchField, GeoMesh> >&) [with Type = Foam::Vector<double>, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh](((const Foam::tmp<Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> >&)((const Foam::tmp<Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> >*)(& Foam::operator-(const Foam::GeometricField<Type1, PatchField, GeoMesh>&, const Foam::dimensioned<Type>&) [with Form = double, Type = Foam::Vector<double>, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh, typename Foam::typeOfSum<Type, Form>::type = Foam::Vector<double>](((const Foam::dimensioned<double>&)((const Foam::dimensioned<double>*)(& TRef))))))))’
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/dimensionSet.H:255:29: note: candidates are: Foam::dimensionSet Foam::operator-(const Foam::dimensionSet&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/dimensionSet.H:263:29: note:                Foam::dimensionSet Foam::operator-(const Foam::dimensionSet&, const Foam::dimensionSet&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/dimensionedScalar.H:52:19: note:                Foam::dimensionedScalar Foam::operator-(const Foam::dimensionedScalar&, Foam::scalar)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/dimensionedScalar.H:53:19: note:                Foam::dimensionedScalar Foam::operator-(Foam::scalar, const Foam::dimensionedScalar&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/scalarField.H:78:1: note:                Foam::tmp<Foam::Field<double> > Foam::operator-(const Foam::scalar&, const Foam::UList<double>&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/scalarField.H:78:1: note:                Foam::tmp<Foam::Field<double> > Foam::operator-(const Foam::scalar&, const Foam::tmp<Foam::Field<double> >&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/scalarField.H:78:1: note:                Foam::tmp<Foam::Field<double> > Foam::operator-(const Foam::UList<double>&, const Foam::scalar&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/scalarField.H:78:1: note:                Foam::tmp<Foam::Field<double> > Foam::operator-(const Foam::tmp<Foam::Field<double> >&, const Foam::scalar&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/labelField.H:54:1: note:                Foam::tmp<Foam::Field<int> > Foam::operator-(const Foam::label&, const Foam::UList<int>&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/labelField.H:54:1: note:                Foam::tmp<Foam::Field<int> > Foam::operator-(const Foam::label&, const Foam::tmp<Foam::Field<int> >&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/labelField.H:54:1: note:                Foam::tmp<Foam::Field<int> > Foam::operator-(const Foam::UList<int>&, const Foam::label&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/labelField.H:54:1: note:                Foam::tmp<Foam::Field<int> > Foam::operator-(const Foam::tmp<Foam::Field<int> >&, const Foam::label&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/diagTensorField.H:61:1: note:                Foam::tmp<Foam::Field<Foam::Tensor<double> > > Foam::operator-(const Foam::UList<Foam::DiagTensor<double> >&, const Foam::UList<Foam::Tensor<double> >&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/diagTensorField.H:61:1: note:                Foam::tmp<Foam::Field<Foam::Tensor<double> > > Foam::operator-(const Foam::UList<Foam::DiagTensor<double> >&, const Foam::tmp<Foam::Field<Foam::Tensor<double> > >&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/diagTensorField.H:61:1: note:                Foam::tmp<Foam::Field<Foam::Tensor<double> > > Foam::operator-(const Foam::tmp<Foam::Field<Foam::DiagTensor<double> > >&, const Foam::UList<Foam::Tensor<double> >&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/diagTensorField.H:61:1: note:                Foam::tmp<Foam::Field<Foam::Tensor<double> > > Foam::operator-(const Foam::tmp<Foam::Field<Foam::DiagTensor<double> > >&, const Foam::tmp<Foam::Field<Foam::Tensor<double> > >&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/diagTensorField.H:64:1: note:                Foam::tmp<Foam::Field<Foam::Tensor<double> > > Foam::operator-(const Foam::diagTensor&, const Foam::UList<Foam::Tensor<double> >&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/diagTensorField.H:64:1: note:                Foam::tmp<Foam::Field<Foam::Tensor<double> > > Foam::operator-(const Foam::diagTensor&, const Foam::tmp<Foam::Field<Foam::Tensor<double> > >&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/diagTensorField.H:64:1: note:                Foam::tmp<Foam::Field<Foam::Tensor<double> > > Foam::operator-(const Foam::UList<Foam::DiagTensor<double> >&, const Foam::tensor&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/diagTensorField.H:64:1: note:                Foam::tmp<Foam::Field<Foam::Tensor<double> > > Foam::operator-(const Foam::tmp<Foam::Field<Foam::DiagTensor<double> > >&, const Foam::tensor&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/vectorTensorTransformI.H:283:36: note:                Foam::vectorTensorTransform Foam::operator-(const Foam::vectorTensorTransform&, const Foam::vector&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/quaternionI.H:273:25: note:                Foam::quaternion Foam::operator-(const Foam::quaternion&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/quaternionI.H:279:25: note:                Foam::quaternion Foam::operator-(const Foam::quaternion&, const Foam::quaternion&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/septernionI.H:190:25: note:                Foam::septernion Foam::operator-(const Foam::septernion&, const Foam::vector&)
createFields.H:163:29: error: ‘g’ was not declared in this scope
createFields.H:169:9: error: redeclaration of ‘Foam::volScalarField p’
createFields.H:7:9: error: ‘Foam::volScalarField p’ previously declared here
createFields.H:179:11: error: redeclaration of ‘Foam::label pRefCell’
createFields.H:130:11: error: ‘Foam::label pRefCell’ previously declared here
createFields.H:180:12: error: redeclaration of ‘Foam::scalar pRefValue’
createFields.H:131:12: error: ‘Foam::scalar pRefValue’ previously declared here
In file included from BuoyantBoussinesqViscoelasticFluidFoam.C:80:0:
TEqn.H:12:5: error: no matching function for call to ‘Foam::fvMatrix<double>::fvMatrix(Foam::tmp<Foam::fvMatrix<Foam::Vector<double> > >)’
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/finiteVolume/lnInclude/fvMatrix.C:418:1: note: candidates are: Foam::fvMatrix<Type>::fvMatrix(const Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>&, Foam::Istream&) [with Type = double]
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/finiteVolume/lnInclude/fvMatrix.C:361:1: note:                Foam::fvMatrix<Type>::fvMatrix(const Foam::tmp<Foam::fvMatrix<Type> >&) [with Type = double]
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/finiteVolume/lnInclude/fvMatrix.C:330:1: note:                Foam::fvMatrix<Type>::fvMatrix(const Foam::fvMatrix<Type>&) [with Type = double]
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/finiteVolume/lnInclude/fvMatrix.C:273:1: note:                Foam::fvMatrix<Type>::fvMatrix(const Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>&, const Foam::dimensionSet&) [with Type = double]
TEqn.H:17:32: error: no match for ‘operator-’ in ‘1.0e+0 - Foam::operator*(const Foam::dimensioned<double>&, const Foam::tmp<Foam::GeometricField<Type, PatchField, GeoMesh> >&) [with Type = Foam::Vector<double>, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh](((const Foam::tmp<Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> >&)((const Foam::tmp<Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> >*)(& Foam::operator-(const Foam::GeometricField<Type1, PatchField, GeoMesh>&, const Foam::dimensioned<Type>&) [with Form = double, Type = Foam::Vector<double>, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh, typename Foam::typeOfSum<Type, Form>::type = Foam::Vector<double>](((const Foam::dimensioned<double>&)((const Foam::dimensioned<double>*)(& TRef))))))))’
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/dimensionSet.H:255:29: note: candidates are: Foam::dimensionSet Foam::operator-(const Foam::dimensionSet&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/dimensionSet.H:263:29: note:                Foam::dimensionSet Foam::operator-(const Foam::dimensionSet&, const Foam::dimensionSet&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/dimensionedScalar.H:52:19: note:                Foam::dimensionedScalar Foam::operator-(const Foam::dimensionedScalar&, Foam::scalar)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/dimensionedScalar.H:53:19: note:                Foam::dimensionedScalar Foam::operator-(Foam::scalar, const Foam::dimensionedScalar&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/scalarField.H:78:1: note:                Foam::tmp<Foam::Field<double> > Foam::operator-(const Foam::scalar&, const Foam::UList<double>&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/scalarField.H:78:1: note:                Foam::tmp<Foam::Field<double> > Foam::operator-(const Foam::scalar&, const Foam::tmp<Foam::Field<double> >&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/scalarField.H:78:1: note:                Foam::tmp<Foam::Field<double> > Foam::operator-(const Foam::UList<double>&, const Foam::scalar&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/scalarField.H:78:1: note:                Foam::tmp<Foam::Field<double> > Foam::operator-(const Foam::tmp<Foam::Field<double> >&, const Foam::scalar&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/labelField.H:54:1: note:                Foam::tmp<Foam::Field<int> > Foam::operator-(const Foam::label&, const Foam::UList<int>&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/labelField.H:54:1: note:                Foam::tmp<Foam::Field<int> > Foam::operator-(const Foam::label&, const Foam::tmp<Foam::Field<int> >&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/labelField.H:54:1: note:                Foam::tmp<Foam::Field<int> > Foam::operator-(const Foam::UList<int>&, const Foam::label&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/labelField.H:54:1: note:                Foam::tmp<Foam::Field<int> > Foam::operator-(const Foam::tmp<Foam::Field<int> >&, const Foam::label&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/diagTensorField.H:61:1: note:                Foam::tmp<Foam::Field<Foam::Tensor<double> > > Foam::operator-(const Foam::UList<Foam::DiagTensor<double> >&, const Foam::UList<Foam::Tensor<double> >&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/diagTensorField.H:61:1: note:                Foam::tmp<Foam::Field<Foam::Tensor<double> > > Foam::operator-(const Foam::UList<Foam::DiagTensor<double> >&, const Foam::tmp<Foam::Field<Foam::Tensor<double> > >&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/diagTensorField.H:61:1: note:                Foam::tmp<Foam::Field<Foam::Tensor<double> > > Foam::operator-(const Foam::tmp<Foam::Field<Foam::DiagTensor<double> > >&, const Foam::UList<Foam::Tensor<double> >&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/diagTensorField.H:61:1: note:                Foam::tmp<Foam::Field<Foam::Tensor<double> > > Foam::operator-(const Foam::tmp<Foam::Field<Foam::DiagTensor<double> > >&, const Foam::tmp<Foam::Field<Foam::Tensor<double> > >&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/diagTensorField.H:64:1: note:                Foam::tmp<Foam::Field<Foam::Tensor<double> > > Foam::operator-(const Foam::diagTensor&, const Foam::UList<Foam::Tensor<double> >&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/diagTensorField.H:64:1: note:                Foam::tmp<Foam::Field<Foam::Tensor<double> > > Foam::operator-(const Foam::diagTensor&, const Foam::tmp<Foam::Field<Foam::Tensor<double> > >&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/diagTensorField.H:64:1: note:                Foam::tmp<Foam::Field<Foam::Tensor<double> > > Foam::operator-(const Foam::UList<Foam::DiagTensor<double> >&, const Foam::tensor&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/diagTensorField.H:64:1: note:                Foam::tmp<Foam::Field<Foam::Tensor<double> > > Foam::operator-(const Foam::tmp<Foam::Field<Foam::DiagTensor<double> > >&, const Foam::tensor&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/vectorTensorTransformI.H:283:36: note:                Foam::vectorTensorTransform Foam::operator-(const Foam::vectorTensorTransform&, const Foam::vector&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/quaternionI.H:273:25: note:                Foam::quaternion Foam::operator-(const Foam::quaternion&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/quaternionI.H:279:25: note:                Foam::quaternion Foam::operator-(const Foam::quaternion&, const Foam::quaternion&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/septernionI.H:190:25: note:                Foam::septernion Foam::operator-(const Foam::septernion&, const Foam::vector&)
BuoyantBoussinesqViscoelasticFluidFoam.C:145:9: error: no matching function for call to ‘Foam::fvMatrix<double>::fvMatrix(Foam::tmp<Foam::fvMatrix<Foam::Vector<double> > >)’
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/finiteVolume/lnInclude/fvMatrix.C:418:1: note: candidates are: Foam::fvMatrix<Type>::fvMatrix(const Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>&, Foam::Istream&) [with Type = double]
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/finiteVolume/lnInclude/fvMatrix.C:361:1: note:                Foam::fvMatrix<Type>::fvMatrix(const Foam::tmp<Foam::fvMatrix<Type> >&) [with Type = double]
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/finiteVolume/lnInclude/fvMatrix.C:330:1: note:                Foam::fvMatrix<Type>::fvMatrix(const Foam::fvMatrix<Type>&) [with Type = double]
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/finiteVolume/lnInclude/fvMatrix.C:273:1: note:                Foam::fvMatrix<Type>::fvMatrix(const Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>&, const Foam::dimensionSet&) [with Type = double]
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/finiteVolume/lnInclude/readPISOControls.H:3:15: warning: unused variable ‘nOuterCorr’
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/finiteVolume/lnInclude/readPISOControls.H:12:16: warning: unused variable ‘momentumPredictor’
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/finiteVolume/lnInclude/readPISOControls.H:15:16: warning: unused variable ‘transonic’
In file included from /home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/GeometricField.C:1270:0,
                from /home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/GeometricField.H:583,
                from /home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/GeometricScalarField.H:38,
                from /home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/GeometricFields.H:34,
                from /home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/finiteVolume/lnInclude/volFields.H:37,
                from /home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/finiteVolume/lnInclude/surfaceInterpolationScheme.C:30,
                from /home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/finiteVolume/lnInclude/surfaceInterpolationScheme.H:234,
                from /home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/finiteVolume/lnInclude/surfaceInterpolate.H:41,
                from /home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/finiteVolume/lnInclude/fvc.H:39,
                from /home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/finiteVolume/lnInclude/fvCFD.H:8,
                from BuoyantBoussinesqViscoelasticFluidFoam.C:36:
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/GeometricFieldFunctions.C: In function ‘void Foam::subtract(Foam::GeometricField<typename Foam::typeOfSum<Type, Form>::type, PatchField, GeoMesh>&, const Foam::GeometricField<Type1, PatchField, GeoMesh>&, const Foam::dimensioned<Type>&) [with Form = double, Type = Foam::Vector<double>, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh, typename Foam::typeOfSum<Type, Form>::type = Foam::Vector<double>]’:
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/GeometricFieldFunctions.C:951:1:  instantiated from ‘Foam::tmp<Foam::GeometricField<typename Foam::typeOfSum<Type, Form>::type, PatchField, GeoMesh> > Foam::operator-(const Foam::GeometricField<Type1, PatchField, GeoMesh>&, const Foam::dimensioned<Type>&) [with Form = double, Type = Foam::Vector<double>, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh, typename Foam::typeOfSum<Type, Form>::type = Foam::Vector<double>]’
createFields.H:144:25:  instantiated from here
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/GeometricFieldFunctions.C:951:1: error: no matching function for call to ‘subtract(Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>::InternalField&, const Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>::InternalField&, const double&)’
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/scalarField.H:78:1: note: candidates are: void Foam::subtract(Foam::Field<double>&, const Foam::scalar&, const Foam::UList<double>&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/scalarField.H:78:1: note:                void Foam::subtract(Foam::Field<double>&, const Foam::UList<double>&, const Foam::scalar&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/labelField.H:54:1: note:                void Foam::subtract(Foam::Field<int>&, const Foam::label&, const Foam::UList<int>&)
.
.
.

this is the 144th line:
Code:

136    volScalarField rhok
137    (
138        IOobject
139        (
140            "rhok",
141            runTime.timeName(),
142          mesh
143        ),
144        1.0 - beta*(T - TRef)
145  );


nimasam September 26, 2012 16:04

1.0 should be defined as dimensioned Scalar :)

adambarfi September 26, 2012 16:12

OK, I fixed it and many other errors. but this error seems to be stronger:

Code:

In file included from BuoyantBoussinesqViscoelasticFluidFoam.C:51:0:
createFields.H: In function ‘int main(int, char**)’:
createFields.H:139:29: error: ‘g’ was not declared in this scope
createFields.H:160:9: warning: left-hand operand of comma has no effect
createFields.H:161:45: warning: right-hand operand of comma has no effect
createFields.H:163:9: warning: right-hand operand of comma has no effect
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/finiteVolume/lnInclude/readPISOControls.H:3:15: warning: unused variable ‘nOuterCorr’
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/finiteVolume/lnInclude/readPISOControls.H:12:16: warning: unused variable ‘momentumPredictor’
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/finiteVolume/lnInclude/readPISOControls.H:15:16: warning: unused variable ‘transonic’
make: *** [Make/linuxGccDPOpt/BuoyantBoussinesqViscoelasticFluidFoam.o] Error 1

and the 139th line:

Code:

138    Info<< "Calculating field g.h\n" << endl;
139    volScalarField gh("gh", g & mesh.C());
140    surfaceScalarField ghf("ghf", g & mesh.Cf());


nimasam September 26, 2012 16:51

you should define "g" , as a dimensionedVector

adambarfi September 26, 2012 17:29

Quote:

Originally Posted by nimasam (Post 383804)
you should define "g" , as a dimensionedVector

the error originates from my .C file. in it I had defined the #include "readGravitationalAcceleration.H" after #include "createFields.H". I exchange them with other.
it seems that my solver was made successfully, but when I want to run my model the below error appears:

Code:

--> FOAM FATAL ERROR:

    gradientInternalCoeffs cannot be called for a calculatedFvPatchField
    on patch floor of field p in file "/home/mostafa/OpenFOAM/mostafa-2.1.0/run/tutorials/viscoelastic/viscoelasticFluidFoam/Hasan_Giesekus/0/p"
    You are probably trying to solve for a field with a default boundary condition.

    From function calculatedFvPatchField<Type>::gradientInternalCoeffs() const
    in file fields/fvPatchFields/basic/calculated/calculatedFvPatchField.C at line 186.

FOAM exiting

do you know what should I do?

nimasam September 26, 2012 23:04

ok, this error returns to your BC, maybe you define a BC which is not known by OpenFOAM ( look at p file and the BC for floor patch)

adambarfi September 27, 2012 14:51

Quote:

Originally Posted by nimasam (Post 383826)
ok, this error returns to your BC, maybe you define a BC which is not known by OpenFOAM ( look at p file and the BC for floor patch)

Dear Nima,
I change the boundary condition in p file, but again this error was shown. I delete the p BC file but again this error appeared. do you think the problem is of my solver? it successfully made. do you think that problem is somewhere in fvSolution or fvScheme?!!!

ata September 29, 2012 05:48

Do you use e.g. p=another field or calculate p from other fields during your calculations?

adambarfi September 29, 2012 11:56

please see the http://www.cfd-online.com/Forums/ope...ot-called.html thread.


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