fvcMeshPhi.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 "fvcMeshPhi.H"
00028 #include "fvMesh.H"
00029 #include "ddtScheme.H"
00030
00031
00032
00033 Foam::tmp<Foam::surfaceScalarField> Foam::fvc::meshPhi
00034 (
00035 const volVectorField& vf
00036 )
00037 {
00038 return fv::ddtScheme<vector>::New
00039 (
00040 vf.mesh(),
00041 vf.mesh().ddtScheme("ddt(" + vf.name() + ')')
00042 )().meshPhi(vf);
00043 }
00044
00045
00046 Foam::tmp<Foam::surfaceScalarField> Foam::fvc::meshPhi
00047 (
00048 const dimensionedScalar& rho,
00049 const volVectorField& vf
00050 )
00051 {
00052 return fv::ddtScheme<vector>::New
00053 (
00054 vf.mesh(),
00055 vf.mesh().ddtScheme("ddt(" + rho.name() + ',' + vf.name() + ')')
00056 )().meshPhi(vf);
00057 }
00058
00059
00060 Foam::tmp<Foam::surfaceScalarField> Foam::fvc::meshPhi
00061 (
00062 const volScalarField& rho,
00063 const volVectorField& vf
00064 )
00065 {
00066 return fv::ddtScheme<vector>::New
00067 (
00068 vf.mesh(),
00069 vf.mesh().ddtScheme("ddt(" + rho.name() + ',' + vf.name() + ')')
00070 )().meshPhi(vf);
00071 }
00072
00073
00074 void Foam::fvc::makeRelative
00075 (
00076 surfaceScalarField& phi,
00077 const volVectorField& U
00078 )
00079 {
00080 if (phi.mesh().moving())
00081 {
00082 phi -= fvc::meshPhi(U);
00083 }
00084 }
00085
00086 void Foam::fvc::makeRelative
00087 (
00088 surfaceScalarField& phi,
00089 const dimensionedScalar& rho,
00090 const volVectorField& U
00091 )
00092 {
00093 if (phi.mesh().moving())
00094 {
00095 phi -= rho*fvc::meshPhi(rho, U);
00096 }
00097 }
00098
00099 void Foam::fvc::makeRelative
00100 (
00101 surfaceScalarField& phi,
00102 const volScalarField& rho,
00103 const volVectorField& U
00104 )
00105 {
00106 if (phi.mesh().moving())
00107 {
00108 phi -= fvc::interpolate(rho)*fvc::meshPhi(rho, U);
00109 }
00110 }
00111
00112
00113 void Foam::fvc::makeAbsolute
00114 (
00115 surfaceScalarField& phi,
00116 const volVectorField& U
00117 )
00118 {
00119 if (phi.mesh().moving())
00120 {
00121 phi += fvc::meshPhi(U);
00122 }
00123 }
00124
00125 void Foam::fvc::makeAbsolute
00126 (
00127 surfaceScalarField& phi,
00128 const dimensionedScalar& rho,
00129 const volVectorField& U
00130 )
00131 {
00132 if (phi.mesh().moving())
00133 {
00134 phi += rho*fvc::meshPhi(rho, U);
00135 }
00136 }
00137
00138 void Foam::fvc::makeAbsolute
00139 (
00140 surfaceScalarField& phi,
00141 const volScalarField& rho,
00142 const volVectorField& U
00143 )
00144 {
00145 if (phi.mesh().moving())
00146 {
00147 phi += fvc::interpolate(rho)*fvc::meshPhi(rho, U);
00148 }
00149 }
00150
00151
00152
Copyright © 2000-2009 OpenCFD Ltd