CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Post-Processing (http://www.cfd-online.com/Forums/openfoam-post-processing/)
-   -   how can see mu(laminar) like mut(turbulent)? (http://www.cfd-online.com/Forums/openfoam-post-processing/123475-how-can-see-mu-laminar-like-mut-turbulent.html)

immortality September 13, 2013 08:37

how can see mu(laminar) like mut(turbulent)?
 
is it possible to see laminar mu(viscosity) after run by any postProcessing utility?

Bernhard September 13, 2013 08:44

Can you give more details? If laminar viscosity is constant, it doesn't make a lot of sense, right?

immortality September 13, 2013 11:36

in some thermophysical models like JANAF it varies with T for perfect gases.

fportela September 13, 2013 12:21

I'm not sure if there is any utility available to do that, but it shouldn't be very hard to implement.

Just create an IOobject for the viscosity, then go through your time steps and store it, is this what you want?

Quote:

Originally Posted by immortality (Post 451556)
in some thermophysical models like JANAF it varies with T for perfect gases.


immortality September 13, 2013 12:31

yes seems be simple to do it before run,but my runs have finished and thought may there be a postProcessing utility,not important,thanks for your consideration dear Felipe.:)

fportela September 13, 2013 13:05

You might want to look at the postChannel utility, just as a reference. This utility computes some fields for each of the time steps and prints out some other things (also for each time step), which I believe is along the same lines of what you are trying to do!

Quote:

Originally Posted by immortality (Post 451570)
yes seems be simple to do it before run,but my runs have finished and thought may there be a postProcessing utility,not important,thanks for your consideration dear Felipe.:)


wyldckat September 15, 2013 17:04

Greetings to all!

@Ehsan: This one seems to be very complicated. At least if we look directly at the thermodynamics part of OpenFOAM.

The problem here is that "nu" is not present in the thermodynamics part of OpenFOAM. It's only present in the transport-related libraries, such as the one for laminar flow, the multiphase flows and the turbulence flows.

The best I can find is the source code provided here: http://repo.or.cz/w/OpenFOAM-2.2.x.g...eclet/Peclet.C - it shows a few ways on how to get the "nuEff", but neither one seem to depend on thermodynamics.

Wait... no no no... it's a compressible model, you don't look for the "nu" directly, you look for "mu" and "rho" and calculate from there!
Arg... I read incorrectly the question :( You want "mu"!!! I'm tired already and the work week hasn't even started...



In theory, it should be as simple as adding something like this to either one of the other applications you sent me:
Code:

            Info<< "    Calculating mu" << endl;
            volScalarField mu
            (
                IOobject
                (
                    "mu",
                    runTime.timeName(),
                    mesh,
                    IOobject::NO_READ
                ),
                thermo.mu()
            );



All times are GMT -4. The time now is 22:43.