diff --git a/apps/showcases/FlowAroundCylinder/Evaluation.cpp b/apps/showcases/FlowAroundCylinder/Evaluation.cpp index fd267b70da89c538e22dc85b8c456e7ae4b477d1..a4b107bdf891e9d434674984e17f444d5f0a39f3 100644 --- a/apps/showcases/FlowAroundCylinder/Evaluation.cpp +++ b/apps/showcases/FlowAroundCylinder/Evaluation.cpp @@ -58,8 +58,8 @@ void Evaluation::operator()() for (auto& block : *blocks) { FlagField_T* flagField = block.getData<FlagField_T>(ids_.flagField); - VelocityField_T* velocityField = block.getData<VelocityField_T>(ids_.avgVelField); - ScalarField_T* densityField = block.getData<ScalarField_T>(ids_.avgPressureField); + VelocityField_T* velocityField = block.getData<VelocityField_T>(ids_.velocityField); + ScalarField_T* densityField = block.getData<ScalarField_T>(ids_.densityField); VelocityField_T* avgVelField = block.getData<VelocityField_T>(ids_.avgVelField); VelocityField_T* avgVelSqrField = block.getData<VelocityField_T>(ids_.avgVelSqrField); ScalarField_T* avgPressureField = block.getData<ScalarField_T>(ids_.avgPressureField); diff --git a/apps/showcases/FlowAroundCylinder/FlowAroundCylinder.cpp b/apps/showcases/FlowAroundCylinder/FlowAroundCylinder.cpp index 771357751699f815f3f14ae81ebdfbdddb1a770a..3fae7ca9b0145bb17c7522ba5ed40267bf467d7c 100644 --- a/apps/showcases/FlowAroundCylinder/FlowAroundCylinder.cpp +++ b/apps/showcases/FlowAroundCylinder/FlowAroundCylinder.cpp @@ -43,6 +43,7 @@ #include "field/FlagField.h" #include "field/StabilityChecker.h" #include "field/adaptors/AdaptorCreators.h" +#include "field/vtk/FlagFieldCellFilter.h" #include "field/vtk/VTKWriter.h" #include "geometry/InitBoundaryHandling.h" @@ -734,6 +735,10 @@ int main(int argc, char** argv) vtkOutput->addCellInclusionFilter(vtk::AABBCellFilter(sliceAABB)); } + field::FlagFieldCellFilter<FlagField_T> fluidFilter( ids.flagField ); + fluidFilter.addFlag(obstacleFlagUID); + vtkOutput->addCellExclusionFilter(fluidFilter); + if (writeVelocity) { auto velWriter = make_shared< field::VTKWriter< VelocityField_T, float32 > >(ids.velocityField, "velocity"); diff --git a/apps/showcases/FlowAroundCylinder/SchaeferTurek3D-1Z.prm b/apps/showcases/FlowAroundCylinder/SchaeferTurek3D-1Z.prm index 3a3f09a31a343858469461ad124fc05bfa82ed7d..5ae5cd63b5213995b04ab306593c4e3091f54529 100644 --- a/apps/showcases/FlowAroundCylinder/SchaeferTurek3D-1Z.prm +++ b/apps/showcases/FlowAroundCylinder/SchaeferTurek3D-1Z.prm @@ -10,7 +10,7 @@ Parameters diameterCylinder 0.1; // On the finest mesh cylinderXPosition 0.5; cylinderyPosition 0.2; - coarseMeshSize 0.01; // 9.765625e-4; + coarseMeshSize 0.00640625; // 9.765625e-4; circularCrossSection true; inflowProfile 1; // 1: Parabolic (SchaeferTurek), 2: uniform (Jacob et al) @@ -34,10 +34,10 @@ Parameters DomainSetup { - cellsPerBlock < 250, 41, 41 >; + cellsPerBlock < 64, 16, 16 >; domainSize < 2.5, 0.41, 0.41 >; periodic < false, false, false>; - refinementLevels 0; + refinementLevels 1; numberProcesses 1; // This is for load balancing, overwritten if more than one proc is used } @@ -60,11 +60,12 @@ StabilityChecker VTKWriter { - vtkWriteFrequency 0; + vtkWriteFrequency 2000; velocity true; density false; + averageFields true; flag false; - writeOnlySlice true; + writeOnlySlice false; amrFileFormat false; oneFilePerProcess false; } @@ -79,7 +80,7 @@ Logging Evaluation { - evaluationCheckFrequency 2000; + evaluationCheckFrequency 1000; rampUpTime 10000; logToStream true; logToFile true;