mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: surface film model updates
This commit is contained in:
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -64,19 +64,19 @@ void thixotropicViscosity::updateMu()
|
|||||||
const dimensionedScalar mSMALL("SMALL", dimMass, ROOTVSMALL);
|
const dimensionedScalar mSMALL("SMALL", dimMass, ROOTVSMALL);
|
||||||
const volScalarField deltaMass("deltaMass", max(m0, film.deltaMass()));
|
const volScalarField deltaMass("deltaMass", max(m0, film.deltaMass()));
|
||||||
const volScalarField filmMass("filmMass", film.netMass() + mSMALL);
|
const volScalarField filmMass("filmMass", film.netMass() + mSMALL);
|
||||||
|
const volScalarField mask(pos(film.delta() - film.deltaSmall()));
|
||||||
|
|
||||||
// weighting field to blend new and existing mass contributions
|
// weighting field to blend new and existing mass contributions
|
||||||
const volScalarField w
|
const volScalarField w
|
||||||
(
|
(
|
||||||
"w",
|
"w",
|
||||||
max(scalar(0.0), min(scalar(1.0), deltaMass/filmMass))
|
max(scalar(0.0), min(scalar(1.0), deltaMass/(deltaMass + filmMass)))
|
||||||
);
|
);
|
||||||
|
|
||||||
// evaluate thixotropic viscosity
|
// set new viscosity
|
||||||
volScalarField muThx("muThx", muInf_/(sqr(1.0 - K_*lambda_) + ROOTVSMALL));
|
mu_ =
|
||||||
|
mask*muInf_/(sqr(1.0 - K_*(1.0 - w)*lambda_) + ROOTVSMALL)
|
||||||
// set new viscosity based on weight field
|
+ (1 - mask)*muInf_;
|
||||||
mu_ = w*muInf_ + (1.0 - w)*muThx;
|
|
||||||
mu_.correctBoundaryConditions();
|
mu_.correctBoundaryConditions();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -260,10 +260,12 @@ tmp<fvScalarMatrix> thermoSingleLayer::q(volScalarField& hs) const
|
|||||||
volScalarField htcst(htcs_->h());
|
volScalarField htcst(htcs_->h());
|
||||||
volScalarField htcwt(htcw_->h());
|
volScalarField htcwt(htcw_->h());
|
||||||
|
|
||||||
forAll(alpha_, i)
|
const volScalarField mask(pos(delta_ - deltaSmall_));
|
||||||
|
|
||||||
|
forAll(mask, i)
|
||||||
{
|
{
|
||||||
htcst[i] *= max(alpha_[i], ROOTVSMALL);
|
htcst[i] *= max(mask[i], ROOTVSMALL);
|
||||||
htcwt[i] *= max(alpha_[i], ROOTVSMALL);
|
htcwt[i] *= max(mask[i], ROOTVSMALL);
|
||||||
}
|
}
|
||||||
|
|
||||||
htcst.correctBoundaryConditions();
|
htcst.correctBoundaryConditions();
|
||||||
|
|||||||
Reference in New Issue
Block a user