Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
VirtualFluids
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
iRMB
VirtualFluids
Commits
756b1843
Commit
756b1843
authored
2 years ago
by
Anna Wellmann
Browse files
Options
Downloads
Patches
Plain Diff
Add sponge kernel to factory
parent
c0c3cd42
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!186
Fix boundary condition edge diagonals
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
apps/gpu/LBM/ActuatorLine/ActuatorLine.cpp
+2
-1
2 additions, 1 deletion
apps/gpu/LBM/ActuatorLine/ActuatorLine.cpp
src/gpu/VirtualFluids_GPU/Kernel/Utilities/KernelFactory/KernelFactoryImp.cpp
+31
-11
31 additions, 11 deletions
...s_GPU/Kernel/Utilities/KernelFactory/KernelFactoryImp.cpp
with
33 additions
and
12 deletions
apps/gpu/LBM/ActuatorLine/ActuatorLine.cpp
+
2
−
1
View file @
756b1843
...
...
@@ -195,7 +195,8 @@ void multipleLevel(const std::string& configPath)
para
->
setViscosityLB
(
viscosityLB
);
para
->
setVelocityRatio
(
dx
/
dt
);
para
->
setViscosityRatio
(
dx
*
dx
/
dt
);
para
->
setMainKernel
(
"CumulantK17"
);
para
->
setDensityRatio
(
1.0
);
para
->
setMainKernel
(
"CumulantK17Sponge"
);
para
->
setInitialCondition
([
&
](
real
coordX
,
real
coordY
,
real
coordZ
,
real
&
rho
,
real
&
vx
,
real
&
vy
,
real
&
vz
)
{
rho
=
(
real
)
0.0
;
...
...
This diff is collapsed.
Click to expand it.
src/gpu/VirtualFluids_GPU/Kernel/Utilities/KernelFactory/KernelFactoryImp.cpp
+
31
−
11
View file @
756b1843
...
...
@@ -11,6 +11,7 @@
#include
"Kernel/Kernels/BasicKernels/FluidFlow/Compressible/CumulantK17Unified/CumulantK17Unified.h"
#include
"Kernel/Kernels/BasicKernels/FluidFlow/Compressible/CumulantK17chim/CumulantK17CompChim.h"
#include
"Kernel/Kernels/BasicKernels/FluidFlow/Compressible/CumulantK17/CumulantK17.h"
#include
"Kernel/Kernels/BasicKernels/FluidFlow/Compressible/CumulantK17Sponge/CumulantK17Sponge.h"
#include
"Kernel/Kernels/BasicKernels/FluidFlow/Compressible/CumulantK17Bulk/CumulantK17BulkComp.h"
#include
"Kernel/Kernels/BasicKernels/FluidFlow/Compressible/CumulantAll4/CumulantAll4CompSP27.h"
#include
"Kernel/Kernels/BasicKernels/FluidFlow/Compressible/CumulantK18/CumulantK18Comp.h"
...
...
@@ -141,11 +142,30 @@ std::shared_ptr<Kernel> KernelFactoryImp::makeKernel(std::shared_ptr<Parameter>
break
;
default:
throw
std
::
runtime_error
(
"Unknown turbulence model!"
);
break
;
}
checkStrategy
=
FluidFlowCompStrategy
::
getInstance
();
break
;
}
checkStrategy
=
FluidFlowCompStrategy
::
getInstance
();
}
else
if
(
kernel
==
"CumulantK17Sponge"
)
{
switch
(
para
->
getTurbulenceModel
())
{
case
TurbulenceModel
::
AMD
:
newKernel
=
CumulantK17Sponge
<
TurbulenceModel
::
AMD
>::
getNewInstance
(
para
,
level
);
break
;
case
TurbulenceModel
::
Smagorinsky
:
newKernel
=
CumulantK17Sponge
<
TurbulenceModel
::
Smagorinsky
>::
getNewInstance
(
para
,
level
);
break
;
case
TurbulenceModel
::
QR
:
newKernel
=
CumulantK17Sponge
<
TurbulenceModel
::
QR
>::
getNewInstance
(
para
,
level
);
break
;
case
TurbulenceModel
::
None
:
newKernel
=
CumulantK17Sponge
<
TurbulenceModel
::
None
>::
getNewInstance
(
para
,
level
);
break
;
default:
throw
std
::
runtime_error
(
"Unknown turbulence model!"
);
break
;
}
checkStrategy
=
FluidFlowCompStrategy
::
getInstance
();
}
else
if
(
kernel
==
"CumulantAll4CompSP27"
)
{
newKernel
=
CumulantAll4CompSP27
::
getNewInstance
(
para
,
level
);
newKernel
=
CumulantAll4CompSP27
::
getNewInstance
(
para
,
level
);
checkStrategy
=
FluidFlowCompStrategy
::
getInstance
();
}
else
if
(
kernel
==
"CumulantK18Comp"
)
{
newKernel
=
CumulantK18Comp
::
getNewInstance
(
para
,
level
);
...
...
@@ -162,8 +182,8 @@ std::shared_ptr<Kernel> KernelFactoryImp::makeKernel(std::shared_ptr<Parameter>
}
else
if
(
kernel
==
"CumulantK15SpongeComp"
)
{
// /\ //
newKernel
=
CumulantK15SpongeComp
::
getNewInstance
(
para
,
level
);
// ||
checkStrategy
=
FluidFlowCompStrategy
::
getInstance
();
// compressible
}
//===============
else
if
(
kernel
==
"BGKIncompSP27"
)
{
// incompressible
}
//===============
else
if
(
kernel
==
"BGKIncompSP27"
)
{
// incompressible
newKernel
=
BGKIncompSP27
::
getNewInstance
(
para
,
level
);
// ||
checkStrategy
=
FluidFlowIncompStrategy
::
getInstance
();
// \/
}
else
if
(
kernel
==
"BGKPlusIncompSP27"
)
{
...
...
@@ -181,11 +201,11 @@ std::shared_ptr<Kernel> KernelFactoryImp::makeKernel(std::shared_ptr<Parameter>
}
else
if
(
kernel
==
"CumulantIsoIncompSP27"
)
{
newKernel
=
CumulantIsoIncompSP27
::
getNewInstance
(
para
,
level
);
checkStrategy
=
FluidFlowIncompStrategy
::
getInstance
();
}
else
if
(
kernel
==
"CumulantK15Incomp"
)
{
// /\ //
}
else
if
(
kernel
==
"CumulantK15Incomp"
)
{
// /\ //
newKernel
=
CumulantK15Incomp
::
getNewInstance
(
para
,
level
);
// ||
checkStrategy
=
FluidFlowIncompStrategy
::
getInstance
();
// incompressible
}
//===============
else
if
(
kernel
==
"PMCumulantOneCompSP27"
)
{
// porous media
}
//===============
else
if
(
kernel
==
"PMCumulantOneCompSP27"
)
{
// porous media
newKernel
=
PMCumulantOneCompSP27
::
getNewInstance
(
para
,
pm
,
level
);
// ||
checkStrategy
=
PMFluidFlowCompStrategy
::
getInstance
();
// porous media
}
//===============
...
...
@@ -198,10 +218,10 @@ std::shared_ptr<Kernel> KernelFactoryImp::makeKernel(std::shared_ptr<Parameter>
}
else
if
(
kernel
==
"WaleCumulantK15Comp"
)
{
newKernel
=
WaleCumulantK15Comp
::
getNewInstance
(
para
,
level
);
checkStrategy
=
WaleFluidFlowCompStrategy
::
getInstance
();
}
else
if
(
kernel
==
"WaleBySoniMalavCumulantK15Comp"
)
{
// /\ //
}
else
if
(
kernel
==
"WaleBySoniMalavCumulantK15Comp"
)
{
// /\ //
newKernel
=
WaleBySoniMalavCumulantK15Comp
::
getNewInstance
(
para
,
level
);
// ||
checkStrategy
=
WaleFluidFlowCompStrategy
::
getInstance
();
// wale model
}
//===============
}
//===============
else
{
throw
std
::
runtime_error
(
"KernelFactory does not know the KernelType."
);
}
...
...
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