CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Programming & Development

calculating the viscous stress tensor tau for viscous dissipation heating

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   April 20, 2010, 13:58
Exclamation calculating the viscous stress tensor tau for viscous dissipation heating
  #1
New Member
 
Dan Gadensgaard
Join Date: Apr 2010
Posts: 13
Rep Power: 7
dgadensg is on a distinguished road
Hi all..

I have made a interTempFoam solver, based on the interFoam solver, in which i have included the temperature equation. However, as i am simulating a very viscous flow (Metal Injection Moulding - POM with metal powder) i would like to add the heat of dissapation to the temperature equation.

To do this i need the stress tensor tau, and i have tried to implement it as shown in the code below:

TEqn.H file:
Code:
   surfaceScalarField mu
    (
        "mu",
        twoPhaseProperties.mu()
    );

volTensorField gradU = fvc::grad(U);

volTensorField tau = mu * (gradU + gradU.T());



//Temperature equation (with viscous dissipation):
fvScalarMatrix TEqn
	(
		
		rho * cp * (fvm::ddt(T) + fvm::div(phi,T)) - fvm::laplacian(kT,T)+ tau && gradU
	);

TEqn.solve();
The equation is added to the solver just before the PISO-loop.

When i try to compile the solver it gives me a lot of errors, shown below:
Code:
In file included from interTempFoam.C:90:
TEqn.H: In function ‘int main(int, char**)’:
TEqn.H:10: fejl: no matching function for call to ‘Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh>::GeometricField(const char [3], Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> >)’
/home/dang/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/GeometricField.C:607: bemærk: candidates are: Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField(const Foam::IOobject&, const Foam::GeometricField<Type, PatchField, GeoMesh>&, const Foam::wordList&) [with Type = double, PatchField = Foam::fvsPatchField, GeoMesh = Foam::surfaceMesh]
/home/dang/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/GeometricField.C:572: bemærk:                 Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField(const Foam::IOobject&, const Foam::GeometricField<Type, PatchField, GeoMesh>&, const Foam::word&) [with Type = double, PatchField = Foam::fvsPatchField, GeoMesh = Foam::surfaceMesh]
/home/dang/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/GeometricField.C:541: bemærk:                 Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField(const Foam::word&, const Foam::tmp<Foam::GeometricField<Type, PatchField, GeoMesh> >&) [with Type = double, PatchField = Foam::fvsPatchField, GeoMesh = Foam::surfaceMesh]
/home/dang/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/GeometricField.C:508: bemærk:                 Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField(const Foam::word&, const Foam::GeometricField<Type, PatchField, GeoMesh>&) [with Type = double, PatchField = Foam::fvsPatchField, GeoMesh = Foam::surfaceMesh]
/home/dang/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/GeometricField.C:476: bemærk:                 Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField(const Foam::IOobject&, const Foam::GeometricField<Type, PatchField, GeoMesh>&) [with Type = double, PatchField = Foam::fvsPatchField, GeoMesh = Foam::surfaceMesh]
/home/dang/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/GeometricField.C:444: bemærk:                 Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField(const Foam::tmp<Foam::GeometricField<Type, PatchField, GeoMesh> >&) [with Type = double, PatchField = Foam::fvsPatchField, GeoMesh = Foam::surfaceMesh]
/home/dang/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/GeometricField.C:412: bemærk:                 Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField(const Foam::GeometricField<Type, PatchField, GeoMesh>&) [with Type = double, PatchField = Foam::fvsPatchField, GeoMesh = Foam::surfaceMesh]
/home/dang/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/GeometricField.C:374: bemærk:                 Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField(const Foam::IOobject&, const typename GeoMesh::Mesh&, Foam::Istream&) [with Type = double, PatchField = Foam::fvsPatchField, GeoMesh = Foam::surfaceMesh]
/home/dang/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/GeometricField.C:333: bemærk:                 Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField(const Foam::IOobject&, const typename GeoMesh::Mesh&) [with Type = double, PatchField = Foam::fvsPatchField, GeoMesh = Foam::surfaceMesh]
/home/dang/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/GeometricField.C:309: bemærk:                 Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField(const Foam::IOobject&, const typename GeoMesh::Mesh&, const Foam::dimensionSet&, const Foam::Field<Type>&, const Foam::PtrList<PatchField<Type> >&) [with Type = double, PatchField = Foam::fvsPatchField, GeoMesh = Foam::surfaceMesh]
/home/dang/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/GeometricField.C:279: bemærk:                 Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField(const Foam::IOobject&, const typename GeoMesh::Mesh&, const Foam::dimensioned<Type>&, const Foam::wordList&) [with Type = double, PatchField = Foam::fvsPatchField, GeoMesh = Foam::surfaceMesh]
/home/dang/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/GeometricField.C:250: bemærk:                 Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField(const Foam::IOobject&, const typename GeoMesh::Mesh&, const Foam::dimensioned<Type>&, const Foam::word&) [with Type = double, PatchField = Foam::fvsPatchField, GeoMesh = Foam::surfaceMesh]
/home/dang/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/GeometricField.C:223: bemærk:                 Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField(const Foam::IOobject&, const typename GeoMesh::Mesh&, const Foam::dimensionSet&, const Foam::wordList&) [with Type = double, PatchField = Foam::fvsPatchField, GeoMesh = Foam::surfaceMesh]
/home/dang/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/GeometricField.C:193: bemærk:                 Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField(const Foam::IOobject&, const typename GeoMesh::Mesh&, const Foam::dimensionSet&, const Foam::word&) [with Type = double, PatchField = Foam::fvsPatchField, GeoMesh = Foam::surfaceMesh]
TEqn.H:14: fejl: no match for ‘operator*’ in ‘mu * Foam::operator+(const Foam::GeometricField<TypeR, PatchField, GeoMesh>&, const Foam::tmp<Foam::GeometricField<Type1, PatchField, GeoMesh> >&) [with Type1 = Foam::Tensor<double>, Type2 = Foam::Tensor<double>, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh](((const Foam::tmp<Foam::GeometricField<Foam::Tensor<double>, Foam::fvPatchField, Foam::volMesh> >&)((const Foam::tmp<Foam::GeometricField<Foam::Tensor<double>, Foam::fvPatchField, Foam::volMesh> >*)(& Foam::GeometricField<Type, PatchField, GeoMesh>::T() const [with Type = Foam::Tensor<double>, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh]()))))’
/home/dang/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/dimensionSet.H:266: bemærk: candidates are: Foam::dimensionSet Foam::operator*(const Foam::dimensionSet&, const Foam::dimensionSet&)
/home/dang/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/dimensionedScalar.H:56: bemærk:                 Foam::dimensionedScalar Foam::operator*(const Foam::dimensionedScalar&, Foam::scalar)
/home/dang/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/scalarField.H:81: bemærk:                 Foam::tmp<Foam::Field<double> > Foam::operator*(const Foam::UList<double>&, const Foam::UList<double>&)
/home/dang/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/scalarField.H:81: bemærk:                 Foam::tmp<Foam::Field<double> > Foam::operator*(const Foam::UList<double>&, const Foam::tmp<Foam::Field<double> >&)
/home/dang/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/scalarField.H:81: bemærk:                 Foam::tmp<Foam::Field<double> > Foam::operator*(const Foam::tmp<Foam::Field<double> >&, const Foam::UList<double>&)
/home/dang/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/scalarField.H:81: bemærk:                 Foam::tmp<Foam::Field<double> > Foam::operator*(const Foam::tmp<Foam::Field<double> >&, const Foam::tmp<Foam::Field<double> >&)
/home/dang/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/symmTensorField.H:71: bemærk:                 Foam::tmp<Foam::Field<Foam::Vector<double> > > Foam::operator*(const Foam::UList<Foam::SymmTensor<double> >&)
/home/dang/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/symmTensorField.H:71: bemærk:                 Foam::tmp<Foam::Field<Foam::Vector<double> > > Foam::operator*(const Foam::tmp<Foam::Field<Foam::SymmTensor<double> > >&)
/home/dang/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/tensorField.H:76: bemærk:                 Foam::tmp<Foam::Field<Foam::Vector<double> > > Foam::operator*(const Foam::UList<Foam::Tensor<double> >&)
/home/dang/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/tensorField.H:76: bemærk:                 Foam::tmp<Foam::Field<Foam::Vector<double> > > Foam::operator*(const Foam::tmp<Foam::Field<Foam::Tensor<double> > >&)
/home/dang/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/tensorField.H:77: bemærk:                 Foam::tmp<Foam::Field<Foam::Tensor<double> > > Foam::operator*(const Foam::UList<Foam::Vector<double> >&)
/home/dang/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/tensorField.H:77: bemærk:                 Foam::tmp<Foam::Field<Foam::Tensor<double> > > Foam::operator*(const Foam::tmp<Foam::Field<Foam::Vector<double> > >&)
/home/dang/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/dimensionedSymmTensor.H:69: bemærk:                 Foam::dimensionedVector Foam::operator*(const Foam::dimensionedSymmTensor&)
/home/dang/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/dimensionedTensor.H:75: bemærk:                 Foam::dimensionedVector Foam::operator*(const Foam::dimensionedTensor&)
/home/dang/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/dimensionedTensor.H:78: bemærk:                 Foam::dimensionedTensor Foam::operator*(const Foam::dimensionedVector&)
/home/dang/OpenFOAM/OpenFOAM-1.6/src/finiteVolume/lnInclude/readPISOControls.H:11: advarsel: unused variable ‘transonic’
/home/dang/OpenFOAM/OpenFOAM-1.6/src/finiteVolume/lnInclude/readPISOControls.H:14: advarsel: unused variable ‘nOuterCorr’
TEqn.H:14: advarsel: unused variable ‘tau’
/home/dang/OpenFOAM/OpenFOAM-1.6/src/finiteVolume/lnInclude/readPISOControls.H:3: advarsel: unused variable ‘nCorr’
/home/dang/OpenFOAM/OpenFOAM-1.6/src/finiteVolume/lnInclude/readPISOControls.H:8: advarsel: unused variable ‘momentumPredictor’
/home/dang/OpenFOAM/OpenFOAM-1.6/src/finiteVolume/lnInclude/readPISOControls.H:11: advarsel: unused variable ‘transonic’
/home/dang/OpenFOAM/OpenFOAM-1.6/src/finiteVolume/lnInclude/readPISOControls.H:14: advarsel: unused variable ‘nOuterCorr’
make: *** [Make/linux64GccDPOpt/interTempFoam.o] Fejl 1
Hope someone can tell me, og give me a hint as to what i am doing wrong?!

// Dan
dgadensg is offline   Reply With Quote

Old   April 20, 2010, 14:56
Default Found one error.
  #2
New Member
 
Dan Gadensgaard
Join Date: Apr 2010
Posts: 13
Rep Power: 7
dgadensg is on a distinguished road
Well, i have now found one of the bugs, but i still get an error as soon as i try to perform:

tau && gradU

what have i missed?

// Dan
dgadensg is offline   Reply With Quote

Old   April 20, 2010, 17:32
Default
  #3
New Member
 
Join Date: Apr 2010
Posts: 9
Rep Power: 7
Bandfrosch is on a distinguished road
Hi dgadensg,

try: rho * cp * (fvm::ddt(T) + fvm::div(phi,T)) - fvm::laplacian(kT,T)+ ( tau && gradU )

( parentheses around double inner product , C operator precedence )


Bandfrosch
Bandfrosch is offline   Reply With Quote

Old   April 21, 2010, 03:16
Default
  #4
New Member
 
Dan Gadensgaard
Join Date: Apr 2010
Posts: 13
Rep Power: 7
dgadensg is on a distinguished road
Hi Bandfrosch

Well, that was a quick fix ;-), it works!

Thank you!

\\Dan
dgadensg is offline   Reply With Quote

Reply

Tags
dissipation, interfoam, temperature

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Incompressible viscous stress in sonicFoam vitke OpenFOAM Running, Solving & CFD 0 September 8, 2007 17:44
viscous dissipation modelling mahjoob FLUENT 0 January 31, 2007 19:52
How to update polyPatchbs localPoints liu OpenFOAM Running, Solving & CFD 6 December 30, 2005 18:27
temperature rise due to viscous dissipation Marek Main CFD Forum 6 December 30, 2004 17:24
VISCOUS heat dissipation Joseph CFX 0 October 1, 2004 08:52


All times are GMT -4. The time now is 13:37.