CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Post-Processing

Monitor viscosity - RhoSimpleFoam

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 15, 2009, 12:08
Default Monitor viscosity - RhoSimpleFoam
  #1
New Member
 
Alain Bouvier
Join Date: Apr 2009
Posts: 3
Rep Power: 17
ABouvier is on a distinguished road
Hello,

I'm using the rhoSimpleFoam solver and i'm tryin to print both viscosity mu and mut in every cell. My problem : unlike p, this viscosities aren't created -in creatField.H- with a volScalarField declaration but came from compressible::RASModel. So they don't appear in the volfieldstatus panel in paraview.
Does somebody know how to access this datas, in paraView or with any other means ?

Thx for your help

Alain
ABouvier is offline   Reply With Quote

Old   April 17, 2009, 02:47
Default Default Monitor viscosity - RhoSimpleFoam
  #2
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,684
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
Attached are two examples of post-processing utilities for calculating the laminar and turbulent viscosities. If you are not fussy about getting the Cmu value from the dictionary (or if you have different dictionaries than I do), you can comment out that bit (eg, with #if 0 .. #endif).
Creating a non-compressible version shouldn't be too hard either.
Attached Files
File Type: txt lamvisc.C.txt (3.0 KB, 163 views)
File Type: txt turbvisc.C.txt (3.7 KB, 74 views)
olesen is offline   Reply With Quote

Old   April 17, 2009, 08:01
Default
  #3
New Member
 
Alain Bouvier
Join Date: Apr 2009
Posts: 3
Rep Power: 17
ABouvier is on a distinguished road
Thx for your answer.
I have solved this problem by switching mu in basicThermo.C (and mut in kEpsilon.C) from NO_WRITE to AUTO_WRITE, but your solution is far less intrusive. I'm knew to OpenFoam and your exemples are a good way for me to go further in the code understanding ; - )
ABouvier is offline   Reply With Quote

Old   April 17, 2009, 08:18
Default
  #4
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,684
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
Quote:
Originally Posted by ABouvier View Post
I have solved this problem by switching mu in basicThermo.C (and mut in kEpsilon.C) from NO_WRITE to AUTO_WRITE
While changing it like you did will work, it has at least two problems:
  • every OpenFOAM solver will now always output these fields.
  • you might have some fun when updating in the future.
A compromise might be to just add the write to your own solver in the main time-loop. You should be able to hook into the line with runTime.write() - this calls the Time::writeObject() method, which should return true at the output interval and false otherwise.

You could try this in the main time-loop (haven't checked if it actually works):

Code:
if (runTime.write())
{
    thermo->mu().write();
    turbulence->mut().write();
}
olesen is offline   Reply With Quote

Old   April 17, 2009, 08:53
Default
  #5
New Member
 
Alain Bouvier
Join Date: Apr 2009
Posts: 3
Rep Power: 17
ABouvier is on a distinguished road
Thx,
it works but only for mu. I don't know why but mut "has no member named ‘write’".
I've achieved to post-process mu and mut so I'm happy ; - ), even if a clean solution is always welcome
ABouvier is offline   Reply With Quote

Old   April 24, 2009, 18:37
Default
  #6
Member
 
Nugroho Adi
Join Date: Mar 2009
Location: norway
Posts: 79
Rep Power: 17
mahaputra is on a distinguished road
Quote:
Originally Posted by olesen View Post
Attached are two examples of post-processing utilities for calculating the laminar and turbulent viscosities. If you are not fussy about getting the Cmu value from the dictionary (or if you have different dictionaries than I do), you can comment out that bit (eg, with #if 0 .. #endif).
Creating a non-compressible version shouldn't be too hard either.
Dear Olesen


Thanks for your post processing utilities

im sorry, stupid question,

could you please teach, clear step by step how to work with your post-processing utilities for calculating the laminar and turbulent viscosities?

im facing a similar case.

please give me help
mahaputra is offline   Reply With Quote

Reply

Tags
monitor print viscosity


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
TRANSONIC FLOW in RHOSIMPLEFOAM dinonettis OpenFOAM Running, Solving & CFD 10 September 13, 2018 10:22
Pressure instability with rhoSimpleFoam daniel_mills OpenFOAM Running, Solving & CFD 44 February 17, 2011 17:08
RhoSimpleFoam jphandrigan OpenFOAM Running, Solving & CFD 18 March 29, 2009 11:05
RhoSimpleFoam FoamX spv24 OpenFOAM Running, Solving & CFD 1 July 21, 2008 10:29
Stability startup problems with rhoSimpleFoam olesen OpenFOAM Running, Solving & CFD 1 July 18, 2006 08:09


All times are GMT -4. The time now is 07:35.