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
4e923453
Commit
4e923453
authored
1 year ago
by
Hussein Alihussein
Browse files
Options
Downloads
Patches
Plain Diff
update application TPMSRow main file according to the new naming convention
parent
768ceb86
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!332
Add TPMSRow Application.
,
!329
Develop temp
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
apps/cpu/TPMSRow/TPMSRow.cpp
+66
-66
66 additions, 66 deletions
apps/cpu/TPMSRow/TPMSRow.cpp
with
66 additions
and
66 deletions
apps/cpu/TPMSRow/TPMSRow.cpp
+
66
−
66
View file @
4e923453
...
...
@@ -77,54 +77,54 @@ void run(string configname)
////////////////////////////////////////////////////////////////////////
// BC
Adapter
// BC
Adapter
Ptr gradient
Adapter
(new VelocityBC
Adapter
(true, true, true, pdxC, pdyC, pdzC, 0.0,
// BC
// BCPtr gradient(new VelocityBC(true, true, true, pdxC, pdyC, pdzC, 0.0,
// BCFunction::INFCONST));
// gradient
Adapter->setBcAlgorithm(BCAlgorithm
Ptr(new FluxBC
Algorithm
()));
// BC
Adapter
Ptr cubeNoslip
Adapter
(new NoSlipBC
Adapter
(1));
SPtr
<
BC
Adapter
>
tpmsNoslip
Adapter
(
new
NoSlipBC
Adapter
());
//SPtr<BC
Adapter
> funnelNoslip
Adapter
(new NoSlipBC
Adapter
(1));
// SPtr<BC
Adapter
> xMinApr(new DensityBC
Adapter
(0.0000001));
SPtr
<
BC
Adapter
>
xMinApr
(
new
DensityBC
Adapter
());
// SPtr<BC
Adapter
> xMinApr(new VelocityBC
Adapter
(vx, 0., BCFunction::INFCONST, 0., 0., BCFunction::INFCONST,
// gradient
->setBCStrategy(BCStrategy
Ptr(new FluxBC
Strategy
()));
// BCPtr cubeNoslip(new NoSlipBC(1));
SPtr
<
BC
>
tpmsNoslip
(
new
NoSlipBC
());
//SPtr<BC> funnelNoslip(new NoSlipBC(1));
// SPtr<BC> xMinApr(new DensityBC(0.0000001));
SPtr
<
BC
>
xMinApr
(
new
DensityBC
());
// SPtr<BC> xMinApr(new VelocityBC(vx, 0., BCFunction::INFCONST, 0., 0., BCFunction::INFCONST,
// 0.,0., BCFunction::INFCONST));
SPtr
<
BC
Adapter
>
xMaxApr
(
new
DensityBC
Adapter
(
0.
));
//SPtr<BC
Adapter
> yMinApr(new NoSlipBC
Adapter
(1));
//SPtr<BC
Adapter
> yMaxApr(new NoSlipBC
Adapter
(1));
SPtr
<
BC
Adapter
>
zMinApr
(
new
NoSlipBC
Adapter
());
SPtr
<
BC
Adapter
>
zMaxApr
(
new
NoSlipBC
Adapter
());
SPtr
<
BC
>
xMaxApr
(
new
DensityBC
(
0.
));
//SPtr<BC> yMinApr(new NoSlipBC(1));
//SPtr<BC> yMaxApr(new NoSlipBC(1));
SPtr
<
BC
>
zMinApr
(
new
NoSlipBC
());
SPtr
<
BC
>
zMaxApr
(
new
NoSlipBC
());
//SPtr<BC
Adapter
> zMinFunnelApr(new NoSlipBC
Adapter
(1));
//SPtr<BC
Adapter
> zMaxFunnelApr(new NoSlipBC
Adapter
(1));
//SPtr<BC> zMinFunnelApr(new NoSlipBC(1));
//SPtr<BC> zMaxFunnelApr(new NoSlipBC(1));
//tpmsNoslip
Adapter->setBcAlgorithm(BCAlgorithm
Ptr(new NoSlipBC
Algorithm
()));
//tpmsNoslip
Adapter->setBcAlgorithm(SPtr<BCAlgorithm
>(new ThinWallNoSlipBC
Algorithm
()));
//tpmsNoslip
->setBCStrategy(BCStrategy
Ptr(new NoSlipBC
Strategy
()));
//tpmsNoslip
->setBCStrategy(SPtr<BCStrategy
>(new ThinWallNoSlipBC
Strategy
()));
tpmsNoslip
Adapter
->
setBcAlgorithm
(
SPtr
<
BCAlgorithm
>
(
new
NoSlipBC
Algorithm
()));
//funnelNoslip
Adapter->setBcAlgorithm(SPtr<BCAlgorithm
>(new NoSlipBC
Algorithm
()));
tpmsNoslip
->
setBCStrategy
(
SPtr
<
BCStrategy
>
(
new
NoSlipBC
Strategy
()));
//funnelNoslip
->setBCStrategy(SPtr<BCStrategy
>(new NoSlipBC
Strategy
()));
//xMinApr->setB
cAlgorithm(SPtr<BCAlgorithm
>(new NonEqDensityBC
Algorithm
()));
// xMinApr->setB
cAlgorithm(SPtr<BCAlgorithm
>(new VelocityBC
Algorithm
()));
xMinApr
->
setB
cAlgorithm
(
SPtr
<
BCAlgorithm
>
(
new
NonReflectingInflowBC
Algorithm
()));
// xMinApr->setB
cAlgorithm(SPtr<BCAlgorithm
>(new VelocityWithDensityBC
Algorithm
()));
//xMaxApr->setB
cAlgorithm(SPtr<BCAlgorithm
>(new NonEqDensityBC
Algorithm
()));
xMaxApr
->
setB
cAlgorithm
(
SPtr
<
BCAlgorithm
>
(
new
NonReflectingOutflow
BCAlgorithm
WithRelaxation
()));
//yMinApr->setB
cAlgorithm(SPtr<BCAlgorithm
>(new NoSlipBC
Algorithm
()));
//yMaxApr->setB
cAlgorithm(SPtr<BCAlgorithm
>(new NoSlipBC
Algorithm
()));
zMinApr
->
setB
cAlgorithm
(
SPtr
<
BCAlgorithm
>
(
new
NoSlipBC
Algorithm
()));
zMaxApr
->
setB
cAlgorithm
(
SPtr
<
BCAlgorithm
>
(
new
NoSlipBC
Algorithm
()));
//xMinApr->setB
CStrategy(SPtr<BCStrategy
>(new NonEqDensityBC
Strategy
()));
// xMinApr->setB
CStrategy(SPtr<BCStrategy
>(new VelocityBC
Strategy
()));
xMinApr
->
setB
CStrategy
(
SPtr
<
BCStrategy
>
(
new
NonReflectingInflowBC
Strategy
()));
// xMinApr->setB
CStrategy(SPtr<BCStrategy
>(new VelocityWithDensityBC
Strategy
()));
//xMaxApr->setB
CStrategy(SPtr<BCStrategy
>(new NonEqDensityBC
Strategy
()));
xMaxApr
->
setB
CStrategy
(
SPtr
<
BCStrategy
>
(
new
NonReflectingOutflowWithRelaxation
BCStrategy
()));
//yMinApr->setB
CStrategy(SPtr<BCStrategy
>(new NoSlipBC
Strategy
()));
//yMaxApr->setB
CStrategy(SPtr<BCStrategy
>(new NoSlipBC
Strategy
()));
zMinApr
->
setB
CStrategy
(
SPtr
<
BCStrategy
>
(
new
NoSlipBC
Strategy
()));
zMaxApr
->
setB
CStrategy
(
SPtr
<
BCStrategy
>
(
new
NoSlipBC
Strategy
()));
//zMinFunnelApr->setB
cAlgorithm(SPtr<BCAlgorithm
>(new NoSlipBC
Algorithm
()));
//zMaxFunnelApr->setB
cAlgorithm(SPtr<BCAlgorithm
>(new NoSlipBC
Algorithm
()));
//zMinFunnelApr->setB
CStrategy(SPtr<BCStrategy
>(new NoSlipBC
Strategy
()));
//zMaxFunnelApr->setB
CStrategy(SPtr<BCStrategy
>(new NoSlipBC
Strategy
()));
////////////////////////////////////////////////////////////////////////
// BC visitor
BoundaryConditionsBlockVisitor
bcVisitor
;
// bcVisitor.addBC(cubeNoslip
Adapter
);
bcVisitor
.
addBC
(
tpmsNoslip
Adapter
);
//bcVisitor.addBC(funnelNoslip
Adapter
);
// bcVisitor.addBC(cubeNoslip);
bcVisitor
.
addBC
(
tpmsNoslip
);
//bcVisitor.addBC(funnelNoslip);
bcVisitor
.
addBC
(
xMinApr
);
bcVisitor
.
addBC
(
xMaxApr
);
//bcVisitor.addBC(yMinApr);
...
...
@@ -143,7 +143,7 @@ void run(string configname)
//spongeLayer.DefineConst("dx", dx);
////////////////////////////////////////////////////////////////////////
// grid, kernel and BC
Processor
// grid, kernel and BC
Set
SPtr
<
Grid3D
>
grid
(
new
Grid3D
(
comm
));
SPtr
<
LBMKernel
>
kernel
;
//kernel = SPtr<LBMKernel>(new IncompressibleCumulantLBMKernel());
...
...
@@ -159,9 +159,9 @@ void run(string configname)
// kernel->setForcingX1(fctForcingX1);
// kernel->setWithForcing(true);
//
// SPtr<ThinWallBC
Processor
> bcProc(new ThinWallBC
Processor
());
SPtr
<
BC
Processor
>
bcProc
(
new
BC
Processor
());
kernel
->
setBC
Processor
(
bcProc
);
// SPtr<ThinWallBC
Set
> bcProc(new ThinWallBC
Set
());
SPtr
<
BC
Set
>
bcProc
(
new
BC
Set
());
kernel
->
setBC
Set
(
bcProc
);
...
...
@@ -173,10 +173,10 @@ void run(string configname)
//////////////////////////////////////////////////////////////////////////
// restart
SPtr
<
UbScheduler
>
mSch
(
new
UbScheduler
(
cpStep
,
cpStart
));
SPtr
<
MPIIOMigration
CoProcessor
>
migCoProcesso
r
(
new
MPIIOMigration
CoProcesso
r
(
grid
,
mSch
,
metisVisitor
,
pathname
+
"/mig"
,
comm
));
mig
CoProcesso
r
->
setLBMKernel
(
kernel
);
mig
CoProcessor
->
setBCProcessor
(
bcProc
);
SPtr
<
MPIIOMigration
SimulationObserver
>
migSimulationObserve
r
(
new
MPIIOMigration
SimulationObserve
r
(
grid
,
mSch
,
metisVisitor
,
pathname
+
"/mig"
,
comm
));
mig
SimulationObserve
r
->
setLBMKernel
(
kernel
);
mig
SimulationObserver
->
setBCSet
(
bcProc
);
//////////////////////////////////////////////////////////////////////////
if
(
newStart
)
{
...
...
@@ -274,10 +274,10 @@ void run(string configname)
if
(
myid
==
0
)
UBLOG
(
logINFO
,
"Refinement - end"
);
}
SPtr
<
CoProcesso
r
>
ppblocks
(
new
WriteBlocks
CoProcesso
r
(
grid
,
SPtr
<
UbScheduler
>
(
new
UbScheduler
(
1
)),
pathname
,
SPtr
<
SimulationObserve
r
>
ppblocks
(
new
WriteBlocks
SimulationObserve
r
(
grid
,
SPtr
<
UbScheduler
>
(
new
UbScheduler
(
1
)),
pathname
,
WbWriterVtkXmlBinary
::
getInstance
(),
comm
));
ppblocks
->
process
(
0
);
ppblocks
->
update
(
0
);
// GbObject3DPtr solidcube(new GbCuboid3D(0, g_minX2, g_minX3, TPMSL[0], g_maxX2, g_maxX3));
// if (myid == 0) GbSystem3D::writeGeoObject(solidcube.get(), pathname + "/geo/solidcube",
...
...
@@ -335,14 +335,14 @@ void run(string configname)
GbSystem3D::writeGeoObject(zMaxFunnel.get(), pathname + "/geo/zMaxFunnel",
WbWriterVtkXmlBinary::getInstance());*/
// D3Q27InteractorPtr cubeInt = D3Q27InteractorPtr(new D3Q27Interactor(solidcube, grid, cubeNoslip
Adapter
,
// D3Q27InteractorPtr cubeInt = D3Q27InteractorPtr(new D3Q27Interactor(solidcube, grid, cubeNoslip,
// Interactor3D::SOLID));
SPtr
<
D3Q27Interactor
>
tpmsInt
=
SPtr
<
D3Q27Interactor
>
(
new
D3Q27Interactor
(
tpms
,
grid
,
tpmsNoslip
Adapter
,
Interactor3D
::
SOLID
,
Interactor3D
::
POINTS
));
new
D3Q27Interactor
(
tpms
,
grid
,
tpmsNoslip
,
Interactor3D
::
SOLID
,
Interactor3D
::
POINTS
));
//SPtr<Interactor3D> funnelInt = SPtr<D3Q27TriFaceMeshInteractor>(
//new D3Q27TriFaceMeshInteractor(funnel, grid, funnelNoslip
Adapter
, Interactor3D::SOLID));
//new D3Q27TriFaceMeshInteractor(funnel, grid, funnelNoslip, Interactor3D::SOLID));
// D3Q27TriFaceMeshInteractorPtr tpmsInt = D3Q27TriFaceMeshInteractorPtr(new
// D3Q27TriFaceMeshInteractor(tpms, grid, tpmsNoslip
Adapter
, Interactor3D::SOLID));
// D3Q27TriFaceMeshInteractor(tpms, grid, tpmsNoslip, Interactor3D::SOLID));
// tpmsInt->setQs2(0);
SPtr
<
D3Q27Interactor
>
xMinInt
=
SPtr
<
D3Q27Interactor
>
(
...
...
@@ -390,7 +390,7 @@ void run(string configname)
PQueuePartitioningGridVisitor
pqPartVisitor
(
numOfThreads
);
grid
->
accept
(
pqPartVisitor
);
ppblocks
->
process
(
0
);
ppblocks
->
update
(
0
);
ppblocks
.
reset
();
//////////////////////////////////////////////////////////////////////////
...
...
@@ -446,8 +446,8 @@ void run(string configname)
// boundary conditions grid
{
SPtr
<
UbScheduler
>
geoSch
(
new
UbScheduler
(
1
));
SPtr
<
CoProcesso
r
>
ppgeo
(
new
WriteBoundaryConditions
CoProcesso
r
(
grid
,
geoSch
,
pathname
,
WbWriterVtkXmlBinary
::
getInstance
(),
comm
));
ppgeo
->
process
(
0
);
SPtr
<
SimulationObserve
r
>
ppgeo
(
new
WriteBoundaryConditions
SimulationObserve
r
(
grid
,
geoSch
,
pathname
,
WbWriterVtkXmlBinary
::
getInstance
(),
comm
));
ppgeo
->
update
(
0
);
ppgeo
.
reset
();
}
if
(
myid
==
0
)
...
...
@@ -467,7 +467,7 @@ void run(string configname)
UBLOG
(
logINFO
,
"path = "
<<
pathname
);
}
mig
CoProcesso
r
->
restart
((
int
)
restartStep
);
mig
SimulationObserve
r
->
restart
((
int
)
restartStep
);
grid
->
setTimeStep
(
restartStep
);
if
(
myid
==
0
)
...
...
@@ -483,11 +483,11 @@ void run(string configname)
SPtr
<
UbScheduler
>
visSch
(
new
UbScheduler
(
outTime
/*,beginTime,endTime*/
));
SPtr
<
CoProcesso
r
>
pp
(
new
WriteMacroscopicQuantities
CoProcesso
r
(
grid
,
visSch
,
pathname
,
WbWriterVtkXmlBinary
::
getInstance
(),
conv
,
comm
));
SPtr
<
SimulationObserve
r
>
pp
(
new
WriteMacroscopicQuantities
SimulationObserve
r
(
grid
,
visSch
,
pathname
,
WbWriterVtkXmlBinary
::
getInstance
(),
conv
,
comm
));
SPtr
<
UbScheduler
>
tavSch
(
new
UbScheduler
(
100
,
timeAvStart
,
timeAvStop
));
SPtr
<
TimeAveragedValues
CoProcesso
r
>
tav
(
new
TimeAveragedValues
CoProcesso
r
(
grid
,
pathname
,
WbWriterVtkXmlBinary
::
getInstance
(),
tavSch
,
comm
,
TimeAveragedValues
CoProcesso
r
::
Density
|
TimeAveragedValues
CoProcesso
r
::
Velocity
|
TimeAveragedValues
CoProcesso
r
::
Fluctuations
));
SPtr
<
TimeAveragedValues
SimulationObserve
r
>
tav
(
new
TimeAveragedValues
SimulationObserve
r
(
grid
,
pathname
,
WbWriterVtkXmlBinary
::
getInstance
(),
tavSch
,
comm
,
TimeAveragedValues
SimulationObserve
r
::
Density
|
TimeAveragedValues
SimulationObserve
r
::
Velocity
|
TimeAveragedValues
SimulationObserve
r
::
Fluctuations
));
tav
->
setWithGhostLayer
(
true
);
SPtr
<
UbScheduler
>
nuSch
(
new
UbScheduler
(
100
,
0
,
endTime
/
2
));
...
...
@@ -498,25 +498,25 @@ void run(string configname)
fnu
.
DefineConst
(
"T"
,
endTime
);
fnu
.
DefineConst
(
"L"
,
(
UnitEdgeLength
/
dx
));
fnu
.
DefineConst
(
"u"
,
vx
);
SPtr
<
CoProcesso
r
>
nupr
(
new
DecreaseViscosity
CoProcesso
r
(
grid
,
nuSch
,
&
fnu
,
comm
));
SPtr
<
SimulationObserve
r
>
nupr
(
new
DecreaseViscosity
SimulationObserve
r
(
grid
,
nuSch
,
&
fnu
,
comm
));
SPtr
<
UbScheduler
>
nupsSch
(
new
UbScheduler
(
10
,
10
,
100000000
));
SPtr
<
CoProcesso
r
>
npr
(
new
NUPSCounter
CoProcesso
r
(
grid
,
nupsSch
,
numOfThreads
,
comm
));
SPtr
<
SimulationObserve
r
>
npr
(
new
NUPSCounter
SimulationObserve
r
(
grid
,
nupsSch
,
numOfThreads
,
comm
));
//omp_set_num_threads(numOfThreads);
numOfThreads
=
1
;
SPtr
<
UbScheduler
>
stepGhostLayer
(
visSch
);
SPtr
<
Calculator
>
calc
ulat
or
(
new
BasicCalc
ulat
or
(
grid
,
stepGhostLayer
,
int
(
endTime
)));
SPtr
<
Simulation
>
sim
ulat
ion
(
new
Sim
ulat
ion
(
grid
,
stepGhostLayer
,
int
(
endTime
)));
//
calc
ulat
or
->add
CoProcesso
r(nupr);
calc
ulat
or
->
add
CoProcesso
r
(
npr
);
calc
ulat
or
->
add
CoProcesso
r
(
pp
);
calc
ulat
or
->
add
CoProcessor
(
migCoProcesso
r
);
calc
ulat
or
->
add
CoProcesso
r
(
tav
);
//
Sim
ulat
ion
->add
SimulationObserve
r(nupr);
sim
ulat
ion
->
add
SimulationObserve
r
(
npr
);
sim
ulat
ion
->
add
SimulationObserve
r
(
pp
);
sim
ulat
ion
->
add
SimulationObserver
(
migSimulationObserve
r
);
sim
ulat
ion
->
add
SimulationObserve
r
(
tav
);
if
(
myid
==
0
)
UBLOG
(
logINFO
,
"Simulation-start"
);
calculator
->
calculate
();
simulation
->
run
();
if
(
myid
==
0
)
UBLOG
(
logINFO
,
"Simulation-end"
);
}
catch
(
std
::
exception
&
e
)
{
...
...
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