Skip to content
GitLab
Menu
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
fcebb1e6
Commit
fcebb1e6
authored
Oct 20, 2011
by
mattijs
Browse files
BUG: potentialFoam/cylinder: indexing into non-existing patch in parallel
parent
f1c79673
Changes
2
Hide whitespace changes
Inline
Side-by-side
tutorials/basic/potentialFoam/cylinder/0.org/U
View file @
fcebb1e6
...
...
@@ -37,8 +37,8 @@ boundaryField
left
{
type
f
ixedValue;
value
uniform (1 0 0);
type
uniformF
ixedValue;
uniform
Value
(1 0 0);
}
cylinder
...
...
tutorials/basic/potentialFoam/cylinder/system/controlDict
View file @
fcebb1e6
...
...
@@ -62,19 +62,39 @@ functions
Info<< "Reading inlet velocity uInfX\n" << endl;
scalar ULeft = 0.0;
label leftI = mesh().boundaryMesh().findPatchID("left");
const fvPatchVectorField& fvp = U.boundaryField()[leftI];
if (fvp.size())
{
ULeft = fvp[0].x();
}
reduce(ULeft, maxOp<scalar>());
dimensionedScalar uInfX
(
"uInfx",
dimensionSet(0, 1, -1, 0, 0),
U
.boundaryField()[3][0].x()
U
Left
);
Info << "U at inlet = " << uInfX.value() << " m/s" << endl;
scalar magCylinder = 0.0;
label cylI = mesh().boundaryMesh().findPatchID("cylinder");
const fvPatchVectorField& cylFvp = mesh().C().boundaryField()[cylI];
if (cylFvp.size())
{
magCylinder = mag(cylFvp[0]);
}
reduce(magCylinder, maxOp<scalar>());
dimensionedScalar radius
(
"radius",
dimensionSet(0, 1, 0, 0, 0),
mag
(U.mesh().boundary()[4].Cf()[0])
mag
Cylinder
);
Info << "Cylinder radius = " << radius.value() << " m" << endl;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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