|
[Sponsors] |
March 11, 2015, 04:14 |
Changing viscosity in interFoam
|
#1 |
Member
Thomas Vossel
Join Date: Aug 2013
Location: Germany
Posts: 45
Rep Power: 12 |
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() ) ); } |
|
|
|
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 |