Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
waLBerla
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Markus Holzer
waLBerla
Commits
66a93d8a
Commit
66a93d8a
authored
3 years ago
by
PP
Browse files
Options
Downloads
Patches
Plain Diff
Updated Covo for unaligned convection
parent
61e62c1a
Branches
hyteg
No related tags found
No related merge requests found
Pipeline
#34336
failed
3 years ago
Stage: pretest
Stage: test
Stage: benchmark
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
apps/showcases/COVO/COVO.cpp
+9
-6
9 additions, 6 deletions
apps/showcases/COVO/COVO.cpp
apps/showcases/COVO/COVO.prm
+3
-2
3 additions, 2 deletions
apps/showcases/COVO/COVO.prm
with
12 additions
and
8 deletions
apps/showcases/COVO/COVO.cpp
+
9
−
6
View file @
66a93d8a
...
...
@@ -49,8 +49,8 @@ class CovoInit
{
public:
CovoInit
(
real_t
circulation
,
real_t
radius
,
Vector3
<
real_t
>
center
,
real_t
lattice_velocity
,
real_t
ss_lattice
)
:
circulation_
(
circulation
),
radius_
(
radius
),
center_
(
center
),
lattice_velocity_
(
lattice_velocity
),
ss_lattice_
(
ss_lattice
){}
CovoInit
(
real_t
circulation
,
real_t
radius
,
Vector3
<
real_t
>
center
,
real_t
lattice_velocity
,
real_t
lattice_velocity_Y
,
real_t
ss_lattice
)
:
circulation_
(
circulation
),
radius_
(
radius
),
center_
(
center
),
lattice_velocity_
(
lattice_velocity
),
lattice_velocity_Y_
(
lattice_velocity_Y
),
ss_lattice_
(
ss_lattice
){}
void
operator
()(
const
shared_ptr
<
StructuredBlockForest
>&
SbF
,
BlockDataID
densityFieldID
,
BlockDataID
velFieldID
)
const
;
...
...
@@ -60,6 +60,7 @@ class CovoInit
const
real_t
radius_
;
const
Vector3
<
real_t
>
center_
;
const
real_t
lattice_velocity_
;
const
real_t
lattice_velocity_Y_
;
const
real_t
ss_lattice_
;
};
// class ShearProfile
...
...
@@ -85,7 +86,7 @@ void CovoInit::operator()(const shared_ptr< StructuredBlockForest >& SbF, BlockD
real_t
rho_loc
=
exp
(
-
(
circ2
/
2
*
ss_lattice_
)
*
var
*
beta
);
velField
->
get
(
x
,
y
,
z
,
0
)
=
d_psi_x
+
lattice_velocity_
;
velField
->
get
(
x
,
y
,
z
,
1
)
=
-
d_psi_y
;
velField
->
get
(
x
,
y
,
z
,
1
)
=
-
d_psi_y
+
lattice_velocity_Y_
;
densityField
->
get
(
x
,
y
,
z
)
=
1.0
*
rho_loc
;
// lattice density is 1.0
)
...
...
@@ -107,7 +108,8 @@ int main(int argc, char** argv)
auto
parameters
=
walberlaEnv
.
config
()
->
getOneBlock
(
"Parameters"
);
const
real_t
ReferenceLength
=
parameters
.
getParameter
<
real_t
>
(
"ReferenceLength"
,
real_t
(
0.1
));
const
real_t
ConvectionVelocity
=
parameters
.
getParameter
<
real_t
>
(
"ConvectionVelocity"
,
real_t
(
170.0
));
const
real_t
ConvectionVelocity_X
=
parameters
.
getParameter
<
real_t
>
(
"ConvectionVelocity_X"
,
real_t
(
170.0
));
const
real_t
ConvectionVelocity_Y
=
parameters
.
getParameter
<
real_t
>
(
"ConvectionVelocity_Y"
,
real_t
(
0.0
));
const
real_t
Radius
=
parameters
.
getParameter
<
real_t
>
(
"Radius"
,
real_t
(
0.005
));
// const real_t Density = parameters.getParameter< real_t >("Density", real_t(1.16));
const
real_t
Circulation
=
parameters
.
getParameter
<
real_t
>
(
"Circulation"
,
real_t
(
34.728
));
...
...
@@ -122,11 +124,12 @@ int main(int argc, char** argv)
// real_t Cd = Density / LatticeDensity;
real_t
Cl
=
ReferenceLength
/
LatticeLength
;
real_t
Cu
=
ConvectionVelocity
/
LatticeVelocity
;
real_t
Cu
=
ConvectionVelocity
_X
/
LatticeVelocity
;
real_t
Ct
=
Cl
/
Cu
;
real_t
LatticeCirculation
=
Circulation
/
Cl
*
Ct
;
real_t
LatticeRadius
=
Radius
/
Cl
;
real_t
LatticeVelocity_Y
=
ConvectionVelocity_Y
/
Cu
;
real_t
SSLattice
=
S_speed
/
Cu
;
...
...
@@ -148,7 +151,7 @@ int main(int argc, char** argv)
BlockDataID
densityFieldID
=
field
::
addToStorage
<
ScalarField_T
>
(
blocks
,
"density"
,
real_t
(
1
),
field
::
fzyx
);
CovoInit
InitData
(
LatticeCirculation
,
LatticeRadius
,
center
,
LatticeVelocity
,
SSLattice
);
CovoInit
InitData
(
LatticeCirculation
,
LatticeRadius
,
center
,
LatticeVelocity
,
LatticeVelocity_Y
,
SSLattice
);
InitData
(
blocks
,
densityFieldID
,
velFieldID
);
pystencils
::
COVO_MacroSetter
setterSweep
(
densityFieldID
,
pdfFieldID
,
velFieldID
);
...
...
This diff is collapsed.
Click to expand it.
apps/showcases/COVO/COVO.prm
+
3
−
2
View file @
66a93d8a
...
...
@@ -3,7 +3,8 @@ Parameters
{
ReferenceLength 0.1; // m
ConvectionVelocity 170.0; // m / s
ConvectionVelocity_X 170.0; // m / s
ConvectionVelocity_Y 0.0; // m / s
Radius 0.005; // m
Density 1.16; // Kg / m^3
Circulation 34.728; // m^2 / s
...
...
@@ -25,4 +26,4 @@ DomainSetup
blocks < 1, 1, 1 >;
cellsPerBlock < 400, 400, 1 >;
periodic < 1, 1, 0 >;
}
\ No newline at end of file
}
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