# calculating the viscous stress tensor tau for viscous dissipation heating

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

 April 20, 2010, 13:58 calculating the viscous stress tensor tau for viscous dissipation heating #1 New Member   Dan Gadensgaard Join Date: Apr 2010 Posts: 13 Rep Power: 8 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::GeometricField(const char [3], Foam::tmp >)’ /home/dang/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/GeometricField.C:607: bemærk: candidates are: Foam::GeometricField::GeometricField(const Foam::IOobject&, const Foam::GeometricField&, 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::GeometricField(const Foam::IOobject&, const Foam::GeometricField&, 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::GeometricField(const Foam::word&, const Foam::tmp >&) [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::GeometricField(const Foam::word&, const Foam::GeometricField&) [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::GeometricField(const Foam::IOobject&, const Foam::GeometricField&) [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::GeometricField(const Foam::tmp >&) [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::GeometricField(const Foam::GeometricField&) [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::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::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::GeometricField(const Foam::IOobject&, const typename GeoMesh::Mesh&, const Foam::dimensionSet&, const Foam::Field&, const Foam::PtrList >&) [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::GeometricField(const Foam::IOobject&, const typename GeoMesh::Mesh&, const Foam::dimensioned&, 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::GeometricField(const Foam::IOobject&, const typename GeoMesh::Mesh&, const Foam::dimensioned&, 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::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::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&, const Foam::tmp >&) [with Type1 = Foam::Tensor, Type2 = Foam::Tensor, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh](((const Foam::tmp, Foam::fvPatchField, Foam::volMesh> >&)((const Foam::tmp, Foam::fvPatchField, Foam::volMesh> >*)(& Foam::GeometricField::T() const [with Type = Foam::Tensor, 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::operator*(const Foam::UList&, const Foam::UList&) /home/dang/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/scalarField.H:81: bemærk: Foam::tmp > Foam::operator*(const Foam::UList&, const Foam::tmp >&) /home/dang/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/scalarField.H:81: bemærk: Foam::tmp > Foam::operator*(const Foam::tmp >&, const Foam::UList&) /home/dang/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/scalarField.H:81: bemærk: Foam::tmp > Foam::operator*(const Foam::tmp >&, const Foam::tmp >&) /home/dang/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/symmTensorField.H:71: bemærk: Foam::tmp > > Foam::operator*(const Foam::UList >&) /home/dang/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/symmTensorField.H:71: bemærk: Foam::tmp > > Foam::operator*(const Foam::tmp > >&) /home/dang/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/tensorField.H:76: bemærk: Foam::tmp > > Foam::operator*(const Foam::UList >&) /home/dang/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/tensorField.H:76: bemærk: Foam::tmp > > Foam::operator*(const Foam::tmp > >&) /home/dang/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/tensorField.H:77: bemærk: Foam::tmp > > Foam::operator*(const Foam::UList >&) /home/dang/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/tensorField.H:77: bemærk: Foam::tmp > > Foam::operator*(const Foam::tmp > >&) /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

 April 20, 2010, 14:56 Found one error. #2 New Member   Dan Gadensgaard Join Date: Apr 2010 Posts: 13 Rep Power: 8 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

 April 20, 2010, 17:32 #3 New Member   Join Date: Apr 2010 Posts: 9 Rep Power: 8 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

 April 21, 2010, 03:16 #4 New Member   Dan Gadensgaard Join Date: Apr 2010 Posts: 13 Rep Power: 8 Hi Bandfrosch Well, that was a quick fix ;-), it works! Thank you! \\Dan

 Tags dissipation, interfoam, temperature

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post vitke OpenFOAM Running, Solving & CFD 0 September 8, 2007 17:44 mahjoob FLUENT 0 January 31, 2007 19:52 liu OpenFOAM Running, Solving & CFD 6 December 30, 2005 18:27 Marek Main CFD Forum 6 December 30, 2004 17:24 Joseph CFX 0 October 1, 2004 08:52

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