Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
openfoam
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Development
openfoam
Commits
09e91aab
Commit
09e91aab
authored
13 years ago
by
andy
Browse files
Options
Downloads
Patches
Plain Diff
ENH: rotorDiskSource - updated calculation of co-ord sys for parallel running
parent
61b511e0
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/fieldSources/basicSource/rotorDiskSource/rotorDiskSource.C
+6
-1
6 additions, 1 deletion
...ieldSources/basicSource/rotorDiskSource/rotorDiskSource.C
with
6 additions
and
1 deletion
src/fieldSources/basicSource/rotorDiskSource/rotorDiskSource.C
+
6
−
1
View file @
09e91aab
...
@@ -252,7 +252,7 @@ void Foam::rotorDiskSource::createCoordinateSystem()
...
@@ -252,7 +252,7 @@ void Foam::rotorDiskSource::createCoordinateSystem()
{
{
case
gmAuto
:
case
gmAuto
:
{
{
// determine rotation origin
// determine rotation origin
(cell volume weighted)
scalar
sumV
=
0
.
0
;
scalar
sumV
=
0
.
0
;
const
scalarField
&
V
=
mesh_
.
V
();
const
scalarField
&
V
=
mesh_
.
V
();
const
vectorField
&
C
=
mesh_
.
C
();
const
vectorField
&
C
=
mesh_
.
C
();
...
@@ -262,6 +262,8 @@ void Foam::rotorDiskSource::createCoordinateSystem()
...
@@ -262,6 +262,8 @@ void Foam::rotorDiskSource::createCoordinateSystem()
sumV
+=
V
[
cellI
];
sumV
+=
V
[
cellI
];
origin
+=
V
[
cellI
]
*
C
[
cellI
];
origin
+=
V
[
cellI
]
*
C
[
cellI
];
}
}
reduce
(
origin
,
sumOp
<
vector
>
());
reduce
(
sumV
,
sumOp
<
scalar
>
());
origin
/=
sumV
;
origin
/=
sumV
;
// determine first radial vector
// determine first radial vector
...
@@ -277,6 +279,8 @@ void Foam::rotorDiskSource::createCoordinateSystem()
...
@@ -277,6 +279,8 @@ void Foam::rotorDiskSource::createCoordinateSystem()
magR
=
mag
(
test
);
magR
=
mag
(
test
);
}
}
}
}
reduce
(
dx1
,
maxMagSqrOp
<
vector
>
());
magR
=
mag
(
dx1
);
// determine second radial vector and cross to determine axis
// determine second radial vector and cross to determine axis
forAll
(
cells_
,
i
)
forAll
(
cells_
,
i
)
...
@@ -292,6 +296,7 @@ void Foam::rotorDiskSource::createCoordinateSystem()
...
@@ -292,6 +296,7 @@ void Foam::rotorDiskSource::createCoordinateSystem()
}
}
}
}
}
}
reduce
(
axis
,
maxMagSqrOp
<
vector
>
());
axis
/=
mag
(
axis
);
axis
/=
mag
(
axis
);
// axis direction is somewhat arbitrary - check if user needs
// axis direction is somewhat arbitrary - check if user needs
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment