SchaefferFrictionalStress.C
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #include "SchaefferFrictionalStress.H"
00028 #include "addToRunTimeSelectionTable.H"
00029
00030
00031
00032 namespace Foam
00033 {
00034 defineTypeNameAndDebug(SchaefferFrictionalStress, 0);
00035
00036 addToRunTimeSelectionTable
00037 (
00038 frictionalStressModel,
00039 SchaefferFrictionalStress,
00040 dictionary
00041 );
00042 }
00043
00044
00045
00046
00047 Foam::SchaefferFrictionalStress::SchaefferFrictionalStress
00048 (
00049 const dictionary& dict
00050 )
00051 :
00052 frictionalStressModel(dict)
00053 {}
00054
00055
00056
00057
00058 Foam::SchaefferFrictionalStress::~SchaefferFrictionalStress()
00059 {}
00060
00061
00062
00063
00064 Foam::tmp<Foam::volScalarField> Foam::SchaefferFrictionalStress::
00065 frictionalPressure
00066 (
00067 const volScalarField& alpha,
00068 const dimensionedScalar& alphaMinFriction,
00069 const dimensionedScalar& alphaMax,
00070 const dimensionedScalar& Fr,
00071 const dimensionedScalar& eta,
00072 const dimensionedScalar& p
00073 ) const
00074 {
00075 return
00076 dimensionedScalar("1e24", dimensionSet(1, -1, -2, 0, 0), 1e24)
00077 *pow(Foam::max(alpha - alphaMinFriction, scalar(0)), 10.0);
00078 }
00079
00080
00081 Foam::tmp<Foam::volScalarField> Foam::SchaefferFrictionalStress::
00082 frictionalPressurePrime
00083 (
00084 const volScalarField& alpha,
00085 const dimensionedScalar& alphaMinFriction,
00086 const dimensionedScalar& alphaMax,
00087 const dimensionedScalar& Fr,
00088 const dimensionedScalar& eta,
00089 const dimensionedScalar& p
00090 ) const
00091 {
00092 return
00093 dimensionedScalar("1e25", dimensionSet(1, -1, -2, 0, 0), 1e25)
00094 *pow(Foam::max(alpha - alphaMinFriction, scalar(0)), 9.0);
00095 }
00096
00097
00098 Foam::tmp<Foam::volScalarField> Foam::SchaefferFrictionalStress::muf
00099 (
00100 const volScalarField& alpha,
00101 const dimensionedScalar& alphaMax,
00102 const volScalarField& pf,
00103 const volTensorField& D,
00104 const dimensionedScalar& phi
00105 ) const
00106 {
00107 const scalar I2Dsmall = 1.0e-15;
00108
00109
00110
00111 tmp<volScalarField> tmuf
00112 (
00113 new volScalarField
00114 (
00115 IOobject
00116 (
00117 "muf",
00118 alpha.mesh().time().timeName(),
00119 alpha.mesh()
00120 ),
00121 alpha.mesh(),
00122 dimensionedScalar("muf", dimensionSet(1, -1, -1, 0, 0), 0.0)
00123 )
00124 );
00125
00126 volScalarField& muff = tmuf();
00127
00128 forAll (D, celli)
00129 {
00130 if (alpha[celli] > alphaMax.value()-5e-2)
00131 {
00132 muff[celli] =
00133 0.5*pf[celli]*sin(phi.value())
00134 /(
00135 sqrt(1.0/6.0*(sqr(D[celli].xx() - D[celli].yy())
00136 + sqr(D[celli].yy() - D[celli].zz())
00137 + sqr(D[celli].zz() - D[celli].xx()))
00138 + sqr(D[celli].xy()) + sqr(D[celli].xz())
00139 + sqr(D[celli].yz())) + I2Dsmall
00140 );
00141 }
00142 }
00143
00144 return tmuf;
00145 }
00146
00147
00148
Copyright © 2000-2009 OpenCFD Ltd