Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
fc2aeba9
Commit
fc2aeba9
authored
Dec 21, 2010
by
Mark Olesen
Browse files
COMP: avoid ambiguous construct from tmp - solvers/ incompressible
parent
1cd5659c
Changes
15
Hide whitespace changes
Inline
Side-by-side
applications/solvers/incompressible/adjointShapeOptimizationFoam/adjointOutletPressure/adjointOutletPressureFvPatchScalarField.C
View file @
fc2aeba9
...
...
@@ -121,7 +121,7 @@ void Foam::adjointOutletPressureFvPatchScalarField::write(Ostream& os) const
namespace
Foam
{
makePatchTypeField
make
NonTemplated
PatchTypeField
(
fvPatchScalarField
,
adjointOutletPressureFvPatchScalarField
...
...
applications/solvers/incompressible/adjointShapeOptimizationFoam/adjointOutletVelocity/adjointOutletVelocityFvPatchVectorField.C
View file @
fc2aeba9
...
...
@@ -96,10 +96,10 @@ void Foam::adjointOutletVelocityFvPatchVectorField::updateCoeffs()
const
fvPatchField
<
vector
>&
Up
=
patch
().
lookupPatchField
<
volVectorField
,
vector
>
(
"U"
);
scalarField
Un
=
mag
(
patch
().
nf
()
&
Up
);
vectorField
UtHat
=
(
Up
-
patch
().
nf
()
*
Un
)
/
(
Un
+
SMALL
);
scalarField
Un
(
mag
(
patch
().
nf
()
&
Up
)
)
;
vectorField
UtHat
(
(
Up
-
patch
().
nf
()
*
Un
)
/
(
Un
+
SMALL
)
)
;
vectorField
Uan
=
patch
().
nf
()
*
(
patch
().
nf
()
&
patchInternalField
());
vectorField
Uan
(
patch
().
nf
()
*
(
patch
().
nf
()
&
patchInternalField
())
)
;
vectorField
::
operator
=
(
phiap
*
patch
().
Sf
()
/
sqr
(
patch
().
magSf
())
+
UtHat
);
//vectorField::operator=(Uan + UtHat);
...
...
@@ -119,7 +119,7 @@ void Foam::adjointOutletVelocityFvPatchVectorField::write(Ostream& os) const
namespace
Foam
{
makePatchTypeField
make
NonTemplated
PatchTypeField
(
fvPatchVectorField
,
adjointOutletVelocityFvPatchVectorField
...
...
applications/solvers/incompressible/adjointShapeOptimizationFoam/adjointShapeOptimizationFoam.C
View file @
fc2aeba9
...
...
@@ -114,7 +114,7 @@ int main(int argc, char *argv[])
solve
(
UEqn
()
==
-
fvc
::
grad
(
p
));
p
.
boundaryField
().
updateCoeffs
();
volScalarField
rAU
=
1
.
0
/
UEqn
().
A
();
volScalarField
rAU
(
1
.
0
/
UEqn
().
A
()
)
;
U
=
rAU
*
UEqn
().
H
();
UEqn
.
clear
();
phi
=
fvc
::
interpolate
(
U
)
&
mesh
.
Sf
();
...
...
@@ -153,10 +153,13 @@ int main(int argc, char *argv[])
{
// Adjoint Momentum predictor
volVectorField
adjointTransposeConvection
=
(
fvc
::
grad
(
Ua
)
&
U
);
//volVectorField adjointTransposeConvection
= fvc::reconstruct
volVectorField
adjointTransposeConvection
(
(
fvc
::
grad
(
Ua
)
&
U
)
)
;
//volVectorField adjointTransposeConvection
//(
// mesh.magSf()*(fvc::snGrad(Ua) & fvc::interpolate(U))
// fvc::reconstruct
// (
// mesh.magSf()*(fvc::snGrad(Ua) & fvc::interpolate(U))
// )
//);
zeroCells
(
adjointTransposeConvection
,
inletCells
);
...
...
@@ -174,7 +177,7 @@ int main(int argc, char *argv[])
solve
(
UaEqn
()
==
-
fvc
::
grad
(
pa
));
pa
.
boundaryField
().
updateCoeffs
();
volScalarField
rAUa
=
1
.
0
/
UaEqn
().
A
();
volScalarField
rAUa
(
1
.
0
/
UaEqn
().
A
()
)
;
Ua
=
rAUa
*
UaEqn
().
H
();
UaEqn
.
clear
();
phia
=
fvc
::
interpolate
(
Ua
)
&
mesh
.
Sf
();
...
...
applications/solvers/incompressible/boundaryFoam/boundaryFoam.C
View file @
fc2aeba9
...
...
@@ -60,7 +60,7 @@ int main(int argc, char *argv[])
{
Info
<<
"Time = "
<<
runTime
.
timeName
()
<<
nl
<<
endl
;
fvVectorMatrix
divR
=
turbulence
->
divDevReff
(
U
);
fvVectorMatrix
divR
(
turbulence
->
divDevReff
(
U
)
)
;
divR
.
source
()
=
flowMask
&
divR
.
source
();
fvVectorMatrix
UEqn
...
...
applications/solvers/incompressible/boundaryFoam/interrogateWallPatches.H
View file @
fc2aeba9
...
...
@@ -13,7 +13,7 @@ forAll(patches, patchi)
if
(
isA
<
wallFvPatch
>
(
currPatch
))
{
const
vectorField
nf
=
currPatch
.
nf
();
const
vectorField
nf
(
currPatch
.
nf
()
)
;
forAll
(
nf
,
facei
)
{
...
...
@@ -67,8 +67,10 @@ else
label
cellId
=
patches
[
patchId
].
faceCells
()[
faceId
];
// create position array for graph generation
scalarField
y
=
scalarField
y
(
wallNormal
&
(
mesh
.
C
().
internalField
()
-
mesh
.
C
().
boundaryField
()[
patchId
][
faceId
]);
&
(
mesh
.
C
().
internalField
()
-
mesh
.
C
().
boundaryField
()[
patchId
][
faceId
])
);
Info
<<
" Height to first cell centre y0 = "
<<
y
[
cellId
]
<<
endl
;
applications/solvers/incompressible/channelFoam/channelFoam.C
View file @
fc2aeba9
...
...
@@ -77,7 +77,7 @@ int main(int argc, char *argv[])
// --- PISO loop
volScalarField
rAU
=
1
.
0
/
UEqn
.
A
();
volScalarField
rAU
(
1
.
0
/
UEqn
.
A
()
)
;
for
(
int
corr
=
0
;
corr
<
nCorr
;
corr
++
)
{
...
...
applications/solvers/incompressible/icoFoam/icoFoam.C
View file @
fc2aeba9
...
...
@@ -66,7 +66,7 @@ int main(int argc, char *argv[])
for
(
int
corr
=
0
;
corr
<
nCorr
;
corr
++
)
{
volScalarField
rAU
=
1
.
0
/
UEqn
.
A
();
volScalarField
rAU
(
1
.
0
/
UEqn
.
A
()
)
;
U
=
rAU
*
UEqn
.
H
();
phi
=
(
fvc
::
interpolate
(
U
)
&
mesh
.
Sf
())
...
...
applications/solvers/incompressible/nonNewtonianIcoFoam/nonNewtonianIcoFoam.C
View file @
fc2aeba9
...
...
@@ -69,7 +69,7 @@ int main(int argc, char *argv[])
for
(
int
corr
=
0
;
corr
<
nCorr
;
corr
++
)
{
volScalarField
rAU
=
1
.
0
/
UEqn
.
A
();
volScalarField
rAU
(
1
.
0
/
UEqn
.
A
()
)
;
U
=
rAU
*
UEqn
.
H
();
phi
=
(
fvc
::
interpolate
(
U
)
&
mesh
.
Sf
())
...
...
applications/solvers/incompressible/pimpleFoam/UEqn.H
View file @
fc2aeba9
...
...
@@ -9,7 +9,7 @@ tmp<fvVectorMatrix> UEqn
UEqn
().
relax
();
volScalarField
rAU
=
1
.
0
/
UEqn
().
A
();
volScalarField
rAU
(
1
.
0
/
UEqn
().
A
()
)
;
if
(
momentumPredictor
)
{
...
...
applications/solvers/incompressible/pisoFoam/pisoFoam.C
View file @
fc2aeba9
...
...
@@ -79,7 +79,7 @@ int main(int argc, char *argv[])
for
(
int
corr
=
0
;
corr
<
nCorr
;
corr
++
)
{
volScalarField
rAU
=
1
.
0
/
UEqn
.
A
();
volScalarField
rAU
(
1
.
0
/
UEqn
.
A
()
)
;
U
=
rAU
*
UEqn
.
H
();
phi
=
(
fvc
::
interpolate
(
U
)
&
mesh
.
Sf
())
...
...
applications/solvers/incompressible/porousSimpleFoam/UEqn.H
View file @
fc2aeba9
...
...
@@ -22,7 +22,7 @@
trTU
=
inv
(
tTU
());
trTU
().
rename
(
"rAU"
);
volVectorField
gradp
=
fvc
::
grad
(
p
);
volVectorField
gradp
(
fvc
::
grad
(
p
)
)
;
for
(
int
UCorr
=
0
;
UCorr
<
nUCorr
;
UCorr
++
)
{
...
...
applications/solvers/incompressible/shallowWaterFoam/CourantNo.H
View file @
fc2aeba9
...
...
@@ -36,9 +36,11 @@ scalar waveCoNum = 0.0;
if
(
mesh
.
nInternalFaces
())
{
scalarField
sumPhi
=
scalarField
sumPhi
(
fvc
::
surfaceSum
(
mag
(
phi
))().
internalField
()
/
h
.
internalField
();
/
h
.
internalField
()
);
CoNum
=
0
.
5
*
gMax
(
sumPhi
/
mesh
.
V
().
field
())
*
runTime
.
deltaTValue
();
...
...
applications/solvers/incompressible/shallowWaterFoam/shallowWaterFoam.C
View file @
fc2aeba9
...
...
@@ -89,10 +89,10 @@ int main(int argc, char *argv[])
// --- PISO loop
for
(
int
corr
=
0
;
corr
<
nCorr
;
corr
++
)
{
volScalarField
rAU
=
1
.
0
/
hUEqn
.
A
();
surfaceScalarField
ghrAUf
=
magg
*
fvc
::
interpolate
(
h
*
rAU
);
volScalarField
rAU
(
1
.
0
/
hUEqn
.
A
()
)
;
surfaceScalarField
ghrAUf
(
magg
*
fvc
::
interpolate
(
h
*
rAU
)
)
;
surfaceScalarField
phih0
=
ghrAUf
*
mesh
.
magSf
()
*
fvc
::
snGrad
(
h0
);
surfaceScalarField
phih0
(
ghrAUf
*
mesh
.
magSf
()
*
fvc
::
snGrad
(
h0
)
)
;
if
(
rotating
)
{
...
...
applications/solvers/incompressible/simpleFoam/pEqn.H
View file @
fc2aeba9
p
.
boundaryField
().
updateCoeffs
();
volScalarField
AU
=
UEqn
().
A
();
volScalarField
AU
(
UEqn
().
A
()
)
;
U
=
UEqn
().
H
()
/
AU
;
UEqn
.
clear
();
phi
=
fvc
::
interpolate
(
U
)
&
mesh
.
Sf
();
...
...
tutorials/incompressible/MRFSimpleFoam/MRFSimpleFoam/MRFSimpleFoam.C
View file @
fc2aeba9
...
...
@@ -73,7 +73,7 @@ int main(int argc, char *argv[])
solve
(
UEqn
()
==
-
fvc
::
grad
(
p
));
p
.
boundaryField
().
updateCoeffs
();
volScalarField
rAU
=
1
.
0
/
UEqn
().
A
();
volScalarField
rAU
(
1
.
0
/
UEqn
().
A
()
)
;
U
=
rAU
*
UEqn
().
H
();
UEqn
.
clear
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment