VolumetricFlowRateEvaluation.h File Reference

Detailed Description

#include "core/DataTypes.h"
#include "core/Set.h"
#include "core/debug/CheckFunctions.h"
#include "core/logging/Logging.h"
#include "core/math/Vector3.h"
#include "core/mpi/MPIManager.h"
#include "core/mpi/Reduce.h"
#include "core/uid/SUID.h"
#include "domain_decomposition/StructuredBlockStorage.h"
#include "field/EvaluationFilter.h"
#include "field/iterators/IteratorMacros.h"
#include <algorithm>
#include <cstdlib>
#include <fstream>
#include <string>
#include <type_traits>

Classes

class  walberla::field::VolumetricFlowRateEvaluation< VelocityField_T, Filter_T >
 Class for evaluating the volumetric flow rate of a simulation. More...
 

Namespaces

 walberla
 \file TimestepTracker.h \ingroup lbm \author Frederik Hennig frede.nosp@m.rik..nosp@m.henni.nosp@m.g@fa.nosp@m.u.de
 
 walberla::field
 
 walberla::field::internal
 

Macros

#define WALBERLA_FIELD_MAKE_VOLUMETRIC_FLOW_RATE_EVALUATION_CONFIG_PARSER(config)
 
#define WALBERLA_FIELD_MAKE_VOLUMETRIC_FLOW_RATE_EVALUATION_SET_AND_RETURN()
 

Typedefs

using walberla::field::internal::FlowRateSolution_T = std::function< real_t()>
 
using walberla::field::internal::FlowRateVelocitySolution_T = std::function< Vector3< real_t >(const Vector3< real_t > &)>
 

Functions

const std::string walberla::field::internal::volumetricFlowRateEvaluationFilename ("flowrate.dat")
 
const real_t walberla::field::internal::volumetricFlowRateEvaluationNormalization (real_t(1))
 
const Vector3< bool > walberla::field::internal::volumetricFlowRateEvaluationAxis (Vector3< bool >(true, false, false))
 
const Vector3< real_t > walberla::field::internal::volumetricFlowRateEvaluationPoint (Vector3< real_t >(real_c(0.5)))
 
const std::string walberla::field::internal::volumetricFlowRateEvaluationConfigBlock ("VolumetricFlowRateEvaluation")
 
template<typename VelocityField_T >
shared_ptr< VolumetricFlowRateEvaluation< VelocityField_T > > walberla::field::makeVolumetricFlowRateEvaluation (const weak_ptr< StructuredBlockStorage > &blocks, const ConstBlockDataID &velocityFieldId, const uint_t plotFrequency, const uint_t logFrequency, const internal::FlowRateSolution_T &solution=internal::FlowRateSolution_T(), const internal::FlowRateVelocitySolution_T &velocitySolution=internal::FlowRateVelocitySolution_T(), const Set< SUID > &requiredSelectors=Set< SUID >::emptySet(), const Set< SUID > &incompatibleSelectors=Set< SUID >::emptySet())
 
template<typename VelocityField_T , typename FlagField_T >
shared_ptr< VolumetricFlowRateEvaluation< VelocityField_T, FlagFieldEvaluationFilter< FlagField_T > > > walberla::field::makeVolumetricFlowRateEvaluation (const weak_ptr< StructuredBlockStorage > &blocks, const ConstBlockDataID &velocityFieldId, const ConstBlockDataID &flagFieldId, const Set< FlagUID > &cellsToEvaluate, const uint_t plotFrequency, const uint_t logFrequency, const internal::FlowRateSolution_T &solution=internal::FlowRateSolution_T(), const internal::FlowRateVelocitySolution_T &velocitySolution=internal::FlowRateVelocitySolution_T(), const Set< SUID > &requiredSelectors=Set< SUID >::emptySet(), const Set< SUID > &incompatibleSelectors=Set< SUID >::emptySet())
 
template<typename VelocityField_T , typename Filter_T >
shared_ptr< VolumetricFlowRateEvaluation< VelocityField_T, Filter_T > > walberla::field::makeVolumetricFlowRateEvaluation (const weak_ptr< StructuredBlockStorage > &blocks, const ConstBlockDataID &velocityFieldId, const Filter_T &filter, const uint_t plotFrequency, const uint_t logFrequency, const internal::FlowRateSolution_T &solution=internal::FlowRateSolution_T(), const internal::FlowRateVelocitySolution_T &velocitySolution=internal::FlowRateVelocitySolution_T(), const Set< SUID > &requiredSelectors=Set< SUID >::emptySet(), const Set< SUID > &incompatibleSelectors=Set< SUID >::emptySet())
 
void walberla::field::internal::volumetricFlowRateEvaluationConfigParser (const Config::BlockHandle &parentBlockHandle, const std::string &configBlockName, uint_t &defaultPlotFrequency, uint_t &defaultLogFrequency, std::string &defaultFilename, real_t &defaultNormalizationFactor, Vector3< real_t > &defaultDomainNormalization, Vector3< bool > &defaultAxis, Vector3< real_t > &defaultSurfacePoint)
 
void walberla::field::internal::volumetricFlowRateEvaluationConfigParser (const shared_ptr< Config > &config, const std::string &configBlockName, uint_t &defaultPlotFrequency, uint_t &defaultLogFrequency, std::string &defaultFilename, real_t &defaultNormalizationFactor, Vector3< real_t > &defaultDomainNormalization, Vector3< bool > &defaultAxis, Vector3< real_t > &defaultSurfacePoint)
 
template<typename VelocityField_T , typename Config_T >
shared_ptr< VolumetricFlowRateEvaluation< VelocityField_T > > walberla::field::makeVolumetricFlowRateEvaluation (const Config_T &config, const weak_ptr< StructuredBlockStorage > &blocks, const ConstBlockDataID &velocityFieldId, const internal::FlowRateSolution_T &solution=internal::FlowRateSolution_T(), const internal::FlowRateVelocitySolution_T &velocitySolution=internal::FlowRateVelocitySolution_T(), const std::string &configBlockName=internal::volumetricFlowRateEvaluationConfigBlock, const Set< SUID > &requiredSelectors=Set< SUID >::emptySet(), const Set< SUID > &incompatibleSelectors=Set< SUID >::emptySet())
 
template<typename VelocityField_T , typename FlagField_T , typename Config_T >
shared_ptr< VolumetricFlowRateEvaluation< VelocityField_T, FlagFieldEvaluationFilter< FlagField_T > > > walberla::field::makeVolumetricFlowRateEvaluation (const Config_T &config, const weak_ptr< StructuredBlockStorage > &blocks, const ConstBlockDataID &velocityFieldId, const ConstBlockDataID &flagFieldId, const Set< FlagUID > &cellsToEvaluate, const internal::FlowRateSolution_T &solution=internal::FlowRateSolution_T(), const internal::FlowRateVelocitySolution_T &velocitySolution=internal::FlowRateVelocitySolution_T(), const std::string &configBlockName=internal::volumetricFlowRateEvaluationConfigBlock, const Set< SUID > &requiredSelectors=Set< SUID >::emptySet(), const Set< SUID > &incompatibleSelectors=Set< SUID >::emptySet())
 
template<typename VelocityField_T , typename Filter_T , typename Config_T >
shared_ptr< VolumetricFlowRateEvaluation< VelocityField_T, Filter_T > > walberla::field::makeVolumetricFlowRateEvaluation (const Config_T &config, const weak_ptr< StructuredBlockStorage > &blocks, const ConstBlockDataID &velocityFieldId, const Filter_T &filter, const internal::FlowRateSolution_T &solution=internal::FlowRateSolution_T(), const internal::FlowRateVelocitySolution_T &velocitySolution=internal::FlowRateVelocitySolution_T(), const std::string &configBlockName=internal::volumetricFlowRateEvaluationConfigBlock, const Set< SUID > &requiredSelectors=Set< SUID >::emptySet(), const Set< SUID > &incompatibleSelectors=Set< SUID >::emptySet())
 

Macro Definition Documentation

◆ WALBERLA_FIELD_MAKE_VOLUMETRIC_FLOW_RATE_EVALUATION_CONFIG_PARSER

#define WALBERLA_FIELD_MAKE_VOLUMETRIC_FLOW_RATE_EVALUATION_CONFIG_PARSER (   config)
Value:
uint_t defaultPlotFrequency = uint_t(0); \
uint_t defaultLogFrequency = uint_t(0); \
std::string defaultFilename = internal::volumetricFlowRateEvaluationFilename; \
real_t defaultNormalizationFactor = internal::volumetricFlowRateEvaluationNormalization; \
auto _blocks = blocks.lock(); \
WALBERLA_CHECK_NOT_NULLPTR( _blocks, "Trying to execute 'makeVolumetricFlowRateEvaluation' for a block storage object that doesn't exist anymore" ); \
Vector3<real_t> defaultDomainNormalization = _blocks->getDomain().sizes(); \
Vector3<bool> defaultAxis = internal::volumetricFlowRateEvaluationAxis; \
Vector3<real_t> defaultSurfacePoint = internal::volumetricFlowRateEvaluationPoint; \
internal::volumetricFlowRateEvaluationConfigParser( config, configBlockName, defaultPlotFrequency, defaultLogFrequency, defaultFilename, \
defaultNormalizationFactor, defaultDomainNormalization, defaultAxis, defaultSurfacePoint );

◆ WALBERLA_FIELD_MAKE_VOLUMETRIC_FLOW_RATE_EVALUATION_SET_AND_RETURN

#define WALBERLA_FIELD_MAKE_VOLUMETRIC_FLOW_RATE_EVALUATION_SET_AND_RETURN ( )
Value:
evaluation->setFilename( defaultFilename ); \
evaluation->setNormalizationFactor( defaultNormalizationFactor ); \
evaluation->setDomainNormalization( defaultDomainNormalization ); \
evaluation->setAxis( defaultAxis ); \
evaluation->setSurfacePoint( defaultSurfacePoint ); \
return evaluation;
const real_t volumetricFlowRateEvaluationNormalization(real_t(1))
const Vector3< real_t > volumetricFlowRateEvaluationPoint(Vector3< real_t >(real_c(0.5)))
std::size_t uint_t
Definition: DataTypes.h:133
const std::string volumetricFlowRateEvaluationFilename("flowrate.dat")
void volumetricFlowRateEvaluationConfigParser(const shared_ptr< Config > &config, const std::string &configBlockName, uint_t &defaultPlotFrequency, uint_t &defaultLogFrequency, std::string &defaultFilename, real_t &defaultNormalizationFactor, Vector3< real_t > &defaultDomainNormalization, Vector3< bool > &defaultAxis, Vector3< real_t > &defaultSurfacePoint)
Definition: VolumetricFlowRateEvaluation.h:555
const Vector3< bool > volumetricFlowRateEvaluationAxis(Vector3< bool >(true, false, false))