- **OpenFOAM Running, Solving & CFD**
(*http://www.cfd-online.com/Forums/openfoam-solving/*)

- - **Adding viscous dissipation term to energy equation**
(*http://www.cfd-online.com/Forums/openfoam-solving/60050-adding-viscous-dissipation-term-energy-equation.html*)

Hi,
I am interested in impHi,
I am interested in implementing the viscous heat dissipation term laplacian(mu,U) in the following energy equation: solve ( fvm::div(phi, T) - fvm::laplacian(alphaEff, T) - S*q/(rho*Cp) (<-source term) - fvm::laplacian(mu, U) (dissipation term) ); } I am a beginner at openFoam so the question might be basic for some on this sight, sorry. anyway. when trying to compile this the following error message starts like: SOURCE_DIR=. SOURCE=hSimpleFoam.C ; g++ -m32 -Dlinux -DDP -Wall -W -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-30 -I/home/erik/OpenFOAM/OpenFOAM-1.3/src/finiteVolume/lnInclude -I/home/erik/OpenFOAM/OpenFOAM-1.3/src/turbulenceModels -I/home/erik/OpenFOAM/OpenFOAM-1.3/src/transportModels -I/home/erik/OpenFOAM/OpenFOAM-1.3/src/OpenFOAM/lnInclude -IlnInclude -I. -fPIC -pthread -c $SOURCE -o Make/linuxGcc4DPOpt/hSimpleFoam.o TT.H: In function 'int main(int, char**)': TT.H:40: error: no match for 'operator-' in 'Foam::operator-(const Foam::tmp<foam::fvmatrix<type> >&, const Foam::tmp<foam::geometricfield<type,> >&) [with Type = double](((const Foam::tmp<foam::geometricfield<double,> >&)((const Foam::tmp<foam::geometricfield<double,> >*)(& Foam::operator/(const Foam::tmp<foam::geometricfield<type,> >&, const Foam::dimensioned<double>&) [with Type = double, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh](((const Foam::dimensioned<double>&)((const Foam::dimensioned<double>*)(& Foam::operator*(const Foam::dimensioned<double>&, const Foam Does anyone know what I am doing wrong /Thanks Erik |

Nope, not like that: what you Nope, not like that: what you are trying to do here is to add a laplacian with U as a working variable into the equation for temperature. Does not make sense
It is basically something like (adjust for compressible fluid etc): volTensorField gradU = fvc::grad(U); the term you want is something like (mu_l*(gradU + gradU.T()) && gradU) This lot appears as the source in the energy equation. Enjoy, Hrv |

thank you for your answer!
thank you for your answer!
Im working on a incompressible flow (modification of simpleFoam) so I guess i dont need to adjust your formula. I have two question on the suggested source term. what is mu_|? what is gradU.T()? my case is a channel with hydraulic diameter of 53mm and 11 meters long. The channel is for an air flow of 20 m/s(approx incompressible). im hoping this extra term will rise the temperature 5 more degrees so that my simulation fits experimental data. Thanks again /Erik |

mu_l is laminar viscosity. grmu_l is laminar viscosity. gradU.T() would be a transpose of the gradU tensor. For incompressible flows, you can just do mu_l*magSqr(gradU), that should do the trick. Don't forget to add turbulence dissipation (epsilon) to the energy blance.
Hrv |

Thank you once again,
anotherThank you once again,
another novice question follows I am afraid. How is epsilon to be added and do you know where I can find ducumentation of this so I can have som sort of theoretical backupp for my thesis work. This formula was no ploblem to add to the energy equation but I wouldent expect you to be surpriced either. /Erik |

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