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

Changing viscosity in interFoam

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 2 Post By olivierG

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   March 11, 2015, 04:14
Default Changing viscosity in interFoam
  #1
Member
 
Thomas Vossel
Join Date: Aug 2013
Location: Germany
Posts: 45
Rep Power: 12
ThomasV is on a distinguished road
Hi!

I want to use interFoam and change the viscosity depending on the temperature. I already included the temperature transport and a method for interpolating the respective viscosity values based on some actually measured data. I'm now struggling to get access to the viscosity field / understanding how all of this works...

1.)
The viscosity is calculated via the incompressibleTwoPhaseMixture model. There a volScalarField "nu_" is created but it's protected so I cannot change it via my solver's code...

2.)
I had a look at the velocity / pressure solver itself to see where the viscosity is passed on to the solver so I could like clone the internally calculated viscosity field in order to pass on an altered version to the actual velocity equations. I would have expected to see it in the momentum equation but for U there's just this:

Code:
    fvVectorMatrix UEqn
    (
        fvm::ddt(rho, U)
      + fvm::div(rhoPhi, U)
      + turbulence->divDevRhoReff(rho, U)
    );

    UEqn.relax();

    if (pimple.momentumPredictor())
    {
        solve
        (
            UEqn
         ==
            fvc::reconstruct
            (
                (
                    fvc::interpolate(interface.sigmaK())*fvc::snGrad(alpha1)
                  - ghf*fvc::snGrad(rho)
                  - fvc::snGrad(p_rgh)
                ) * mesh.magSf()
            )
        );
    }
So at which point in the solver's code does the viscosity play a role and how can I get access to the viscosity field in order to change it?
ThomasV is offline   Reply With Quote

 


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
InterFoam viscosity problem / possible bug pbryant OpenFOAM Running, Solving & CFD 24 March 30, 2020 04:25
Problem with divergence TDK FLUENT 13 December 14, 2018 06:00
[PyFoam] Problems with the new PyFoam release zfaraday OpenFOAM Community Contributions 13 December 9, 2014 18:58
[PyFoam] having problems with pyfoam Installation vitorspadetoventurin OpenFOAM Community Contributions 3 December 2, 2014 07:18
Viscosity interpolation in interFoam Jun Kwon Park OpenFOAM Running, Solving & CFD 0 October 9, 2009 08:29


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