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/)
-   -   problem in defining the temperature dependent viscosity!!! (http://www.cfd-online.com/Forums/openfoam-programming-development/114094-problem-defining-temperature-dependent-viscosity.html)

adambarfi March 5, 2013 06:25

problem in defining the temperature dependent viscosity!!!
 
Hello everybody,

Is here anybody knows how can I define a temperature dependent viscosity in viscoelasticFluidFoam. I before add temperature equation to the solver.
mu(T)=mu1*exp(-gamma*(T-TRef))

I started it with adding a volScalarField& T to the solver and make some modifications. also, since I need gamma and T1, I added them in viscolesticLaws/GiesekusTDependent/GiesekusTDependent.C and GiesekusTDependent.H

when I want to make it the following error appeared:


Code:


Making dependency list for source file viscoelasticLaws/GiesekusTDependent/GiesekusTDependent.C
SOURCE=viscoelasticLaws/GiesekusTDependent/GiesekusTDependent.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 -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/GiesekusTDependent.o
viscoelasticLaws/GiesekusTDependent/GiesekusTDependent.C: In member function ‘virtual Foam::tmp<Foam::fvMatrix<Foam::Vector<double> > > Foam::GiesekusTDependent::divTau(Foam::volVectorField&) const’:
viscoelasticLaws/GiesekusTDependent/GiesekusTDependent.C:78:50: error: no match for ‘operator-’ in ‘((const Foam::GiesekusTDependent*)this)->Foam::viscoelasticLawTDependent::T - ((const Foam::GiesekusTDependent*)this)->Foam::GiesekusTDependent::Tn_’
/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&)
viscoelasticLaws/GiesekusTDependent/GiesekusTDependent.C:84:53: error: no match for ‘operator-’ in ‘((const Foam::GiesekusTDependent*)this)->Foam::viscoelasticLawTDependent::T - ((const Foam::GiesekusTDependent*)this)->Foam::GiesekusTDependent::Tn_’
/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&)
viscoelasticLaws/GiesekusTDependent/GiesekusTDependent.C: In member function ‘virtual void Foam::GiesekusTDependent::correct()’:
viscoelasticLaws/GiesekusTDependent/GiesekusTDependent.C:106:27: error: no match for ‘operator-’ in ‘((Foam::GiesekusTDependent*)this)->Foam::viscoelasticLawTDependent::T - ((Foam::GiesekusTDependent*)this)->Foam::GiesekusTDependent::Tn_’
/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
.
.
.

any body knows what should I do?

thanks
Mostafa


All times are GMT -4. The time now is 19:44.