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

adding viscous dissipation to openfoam solver

Register Blogs Community New Posts Updated Threads Search

Like Tree4Likes
  • 1 Post By Tobi
  • 1 Post By elones
  • 1 Post By elones
  • 1 Post By alimea

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 19, 2018, 10:31
Default adding viscous dissipation to openfoam solver
  #1
Senior Member
 
A. Min
Join Date: Mar 2015
Posts: 308
Rep Power: 12
alimea is on a distinguished road
Hi
I want to add viscous dissipation to energy eqn. but my fluid is not Newtonian and has a special stress tensor. So the work of stress tensor field is "tau && grad(U)"

1- is it a correct relation for work of stress tensor field? or I should write:
tau && [grad(U) + transpose of (grad(U))]

2- is it correct to write:

solve
(
fvm::div(phi, T)
- fvm::laplacian(alphaEff, T)
- tau && grad(U)
);

thank you
alimea is offline   Reply With Quote

Old   January 22, 2018, 19:01
Default
  #2
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hi,

I would expect to have the shear heating given as:

\boldsymbol \tau \boldsymbol \colon (\nabla \otimes \textbf{U})

However, I am not sure about Non-Newtonian fluids. The only change should be in the viscosity (which does not follow a linear profile). The stress tensor itself should be similar to those of Newtonian fluids. I might be wrong in that case and have to proof it somewhere in literature. The equation of the shear-heating is correct.
alimea likes this.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   January 23, 2018, 03:34
Default
  #3
Senior Member
 
A. Min
Join Date: Mar 2015
Posts: 308
Rep Power: 12
alimea is on a distinguished road
Quote:
Originally Posted by Tobi View Post
Hi,

I would expect to have the shear heating given as:

\boldsymbol \tau \boldsymbol \colon (\nabla \otimes \textbf{U})

However, I am not sure about Non-Newtonian fluids. The only change should be in the viscosity (which does not follow a linear profile). The stress tensor itself should be similar to those of Newtonian fluids. I might be wrong in that case and have to proof it somewhere in literature. The equation of the shear-heating is correct.
Thank you, I found it. Yes, that is correct. but we should add transpose of grad(U) to your formula:
tau && [grad(U) + transpose of (grad(U))]
this relation is valid for viscoelastic fluid, just we should use viscoelastic stress tensor.
alimea is offline   Reply With Quote

Old   January 23, 2018, 04:21
Default
  #4
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Thanks for the reply. Can you give me a reference for proof? Thus, I can add this information to my book.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   January 23, 2018, 11:48
Default
  #5
New Member
 
Join Date: Mar 2014
Location: Czech Republic
Posts: 29
Rep Power: 14
elones is on a distinguished road
Hi,
this is incorrect.
If Tau is Cauchy stress tensor then (does not matter what kind, i.e., viscoelastic fluid etc.)
\boldsymbol{\tau} : \boldsymbol{\nabla} \boldsymbol{v} = 
\boldsymbol{\tau} : \frac{1}{2} \left( \boldsymbol{\nabla} \boldsymbol{v} + (\boldsymbol{\nabla} \boldsymbol{v})^T \right),
but note that by "additing" transpose of gradient of the velocity to the formula, you really gives less information in the formula as
\frac{1}{2} \left( \boldsymbol{\nabla} \boldsymbol{v} + (\boldsymbol{\nabla} \boldsymbol{v})^T \right),
is symmetric part of the gradient of the velocity. This is indeed used in many proofs.

Best Ondra
alimea likes this.
elones is offline   Reply With Quote

Old   January 23, 2018, 14:00
Default
  #6
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
I don't get your point. Who is wrong and what is correct now?
In general the Cauchy stress tensor is defined as \boldsymbol \sigma while the shear tensor is \boldsymbol \tau such as:

\boldsymbol \sigma = \boldsymbol \tau - p\textbf{I}

while \boldsymbol \tau is the deviatoric part of the Cauchy stress tensor and the negative pressure represents the hydrostatic part such as:

\boldsymbol \sigma= \boldsymbol \sigma^\mathrm{dev} + \boldsymbol \sigma^\mathrm{hyd}

Based on Bird et al. the viscose heating is related to:

\boldsymbol \tau \boldsymbol \colon (\nabla \otimes \textbf{U})

but it is mentioned that you have to have an symmetric shear tensor (\tau_{xy} = \tau_{yx}). Thus, your relation is only valid for symmetric ones; if this was the thing you wanted to point out, I just clearyfied the things. If there is some mistake, please don't hesitate to correct me.

only valid for symmetric shear rate tensor \textbf{D}

while \textbf{D} is given as:

\textbf{D} = \frac{1}{2} [\nabla \otimes \textbf{U} + (\nabla \otimes \textbf{U})^\mathrm{T}]
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   January 23, 2018, 14:24
Default
  #7
New Member
 
Join Date: Mar 2014
Location: Czech Republic
Posts: 29
Rep Power: 14
elones is on a distinguished road
Quote:
Originally Posted by Tobi View Post
I don't get your point. Who is wrong and what is correct now?
In general the Cauchy stress tensor is defined as \boldsymbol \sigma while the shear tensor is \boldsymbol \tau such as:

\boldsymbol \sigma = \boldsymbol \tau - p\textbf{I}

while \boldsymbol \tau is the deviatoric part of the Cauchy stress tensor and the negative pressure represents the hydrostatic part such as:

\boldsymbol \sigma= \boldsymbol \sigma^\mathrm{dev} + \boldsymbol \sigma^\mathrm{hyd}
you mean the gradient of the velocity. Note that

Based on Bird et al. the viscose heating is related to:

\boldsymbol \tau \boldsymbol \colon (\nabla \otimes \textbf{U})

but it is mentioned that you have to have an symmetric shear tensor (\tau_{xy} = \tau_{yx}). Thus, your relation is only valid for symmetric ones; if this was the thing you wanted to point out, I just clearyfied the things. If there is some mistake, please don't hesitate to correct me.

only valid for symmetric shear rate tensor \textbf{D}

while \textbf{D} is given as:

\textbf{D} = \frac{1}{2} [\nabla \otimes \textbf{U} + (\nabla \otimes \textbf{U})^\mathrm{T}]

Sorry, I forget to cite alimea post. My post was reaction mainly to point-out that it does not matter if the Newtonian fluid is under consideration.

I defined Cauchy stress as Tau not Sigma, but it really does not matter in our discussion. Cauchy stress is always symmetric and the D is defined as symmetric part of the gradient of the velocity. So the formula holds always within classical mechanics of continuum.
Tobi likes this.
elones is offline   Reply With Quote

Old   January 23, 2018, 15:55
Default
  #8
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
I agree, the nomenclature does not play a big deal here. However, do you have any example in which the Cauchy stress tensor, or the general formulation - given in Gurtin et al. - The Mechanics and Thermodynamics of Continua - is not symmetric?

PS: Did you comment in the quotes? I did not mean the gradient. What did you mean there?
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   January 23, 2018, 16:09
Default
  #9
New Member
 
Join Date: Mar 2014
Location: Czech Republic
Posts: 29
Rep Power: 14
elones is on a distinguished road
Quote:
Originally Posted by Tobi View Post
I agree, the nomenclature does not play a big deal here. However, do you have any example in which the Cauchy stress tensor, or the general formulation - given in Gurtin et al. - The Mechanics and Thermodynamics of Continua - is not symmetric?
No, as long as conservation of angular momentum holds the Cauchy stress tensor is symmetric.
elones is offline   Reply With Quote

Old   March 22, 2019, 01:54
Default
  #10
Senior Member
 
Hojatollah Gholami
Join Date: Jan 2019
Posts: 171
Rep Power: 7
Hgholami is on a distinguished road
Dear alimea
Do you add viscous dissipation to energy equation? I have the same problem, if favor me, I pleasure. thanks
Hgholami is offline   Reply With Quote

Old   March 22, 2019, 14:48
Default
  #11
Senior Member
 
A. Min
Join Date: Mar 2015
Posts: 308
Rep Power: 12
alimea is on a distinguished road
Quote:
Originally Posted by Hgholami View Post
Dear alimea
Do you add viscous dissipation to energy equation? I have the same problem, if favor me, I pleasure. thanks
Hi
what's your problem?
alimea is offline   Reply With Quote

Old   March 22, 2019, 15:17
Default
  #12
Senior Member
 
Hojatollah Gholami
Join Date: Jan 2019
Posts: 171
Rep Power: 7
Hgholami is on a distinguished road
Dear alimea
I want to add a viscous heating term to energy equation as below
Hgholami is offline   Reply With Quote

Old   March 23, 2019, 18:21
Default
  #13
Senior Member
 
A. Min
Join Date: Mar 2015
Posts: 308
Rep Power: 12
alimea is on a distinguished road
Quote:
Originally Posted by Hgholami View Post
Dear alimea
I want to add a viscous heating term to energy equation as below
ok. what's the problem?
alimea is offline   Reply With Quote

Old   March 24, 2019, 01:05
Default
  #14
Senior Member
 
Hojatollah Gholami
Join Date: Jan 2019
Posts: 171
Rep Power: 7
Hgholami is on a distinguished road
I want to add last term to energy equation, So I uses
Quote:
tau=rho_*fluid.nu()*(twoSymm(fvc::grad(U_)))
I22=(tau && fvc::grad(U_)); //for I2/2
Is it true?
Hgholami is offline   Reply With Quote

Old   March 24, 2019, 02:09
Default
  #15
Senior Member
 
A. Min
Join Date: Mar 2015
Posts: 308
Rep Power: 12
alimea is on a distinguished road
Quote:
Originally Posted by Hgholami View Post
I want to add last term to energy equation, So I uses Is it true?
Yes. But don't forget that there is a viscosity in your first formula. in fact:

stressWork = (1.0/(rho*Cp))*( tau && fvc::grad(U) );

Regards
Hgholami likes this.
alimea is offline   Reply With Quote

Old   March 24, 2019, 02:19
Default
  #16
Senior Member
 
Hojatollah Gholami
Join Date: Jan 2019
Posts: 171
Rep Power: 7
Hgholami is on a distinguished road
Quote:
Originally Posted by alimea View Post
Yes. But don't forget that there is a viscosity in your first formula. in fact:

stressWork = (1.0/(rho*Cp))*( tau && fvc::grad(U) );

Regards
In first Formula, fluid.nu() is dynamic viscosity that multiply with density to give kinematic viscosity?
Hgholami is offline   Reply With Quote

Old   November 17, 2024, 18:26
Default
  #17
Senior Member
 
aerothermal's Avatar
 
Guilherme da Silva
Join Date: Aug 2010
Location: Sao Paulo - Brazil
Posts: 120
Rep Power: 16
aerothermal is on a distinguished road
Send a message via Skype™ to aerothermal
Quote:
Originally Posted by alimea View Post
Hi
I want to add viscous dissipation to energy eqn. but my fluid is not Newtonian and has a special stress tensor. So the work of stress tensor field is "tau && grad(U)"

1- is it a correct relation for work of stress tensor field? or I should write:
tau && [grad(U) + transpose of (grad(U))]

2- is it correct to write:

solve
(
fvm::div(phi, T)
- fvm::laplacian(alphaEff, T)
- tau && grad(U)
);

thank you
Code:
  // Step 1: Calculate deviatoric stress tensor
  volSymmTensorField devRhoReff = turbulence->devRhoReff();

  // Step 2: Compute the velocity gradient tensor
  volTensorField gradU = fvc::grad(U);

  // Step 3: Compute the viscous dissipation term
  volScalarField viscousDissipation("viscousDissipation", devRhoReff && gradU);

  // Optional: Log the min and max of viscous dissipation for debugging
  Info << "Viscous Dissipation (min, max): "
    << min(viscousDissipation).value() << ", "
    << max(viscousDissipation).value() << endl;

  // Step 4: Construct the enthalpy equation
  fvScalarMatrix hEqn
  (
    fvm::ddt(rho, h)
  + fvm::div(phi, h)
  - fvm::laplacian(turbulence->alphaEff(), h)
  ==
    DpDt + viscousDissipation
  );
based on

https://develop.openfoam.com/Develop...sDissipation.C
aerothermal is offline   Reply With Quote

Reply

Tags
openfoam, viscous dissipation


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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
PEMFC model with FLUENT brahimchoice FLUENT 22 April 19, 2020 16:44
Density-based, fully-coupled, compressible solver in OpenFOAM? francesco_capuano OpenFOAM Running, Solving & CFD 7 November 20, 2018 14:12
Parallelisation of a new solid solver in OpenFOAM Jibran OpenFOAM Programming & Development 3 August 25, 2017 07:41
Sharing links for two phase solver packages developed by openfoam community swap_9068 OpenFOAM Programming & Development 1 April 2, 2017 06:43
Wave Action Equation Solver for OpenFOAM chyczewski OpenFOAM Programming & Development 7 September 4, 2013 12:06


All times are GMT -4. The time now is 12:02.