Nektar++
|
This processing module calculates the wall shear stress and adds it as an extra-field to the output file, and writes it to a surface output file. More...
#include <ProcessBodyFittedVelocity.h>
Public Member Functions | |
ProcessBodyFittedVelocity (FieldSharedPtr f) | |
~ProcessBodyFittedVelocity () override | |
void | GenPntwiseBodyFittedCoordSys (const int targetBndId, const Array< OneD, NekDouble > assistVec, Array< OneD, NekDouble > &distance, Array< OneD, Array< OneD, Array< OneD, NekDouble > > > &bfcsDir, const bool isCheckAngle, const NekDouble distTol=1.0e-12, const NekDouble iterTol=1.0e-12, const NekDouble dirTol=1.0e-4, const NekDouble geoTol=1.0e-12) |
At each quadrature point inside the domian, compute the body-fitted coordinate system with respect to the input boundary id. More... | |
Public Member Functions inherited from Nektar::FieldUtils::ProcessBoundaryExtract | |
ProcessBoundaryExtract (FieldSharedPtr f) | |
~ProcessBoundaryExtract () override | |
Public Member Functions inherited from Nektar::FieldUtils::ProcessModule | |
ProcessModule () | |
ProcessModule (FieldSharedPtr p_f) | |
Public Member Functions inherited from Nektar::FieldUtils::Module | |
FIELD_UTILS_EXPORT | Module (FieldSharedPtr p_f) |
virtual | ~Module ()=default |
void | Process (po::variables_map &vm) |
std::string | GetModuleName () |
std::string | GetModuleDescription () |
const ConfigOption & | GetConfigOption (const std::string &key) const |
ModulePriority | GetModulePriority () |
std::vector< ModuleKey > | GetModulePrerequisites () |
FIELD_UTILS_EXPORT void | RegisterConfig (std::string key, std::string value="") |
Register a configuration option with a module. More... | |
FIELD_UTILS_EXPORT void | PrintConfig () |
Print out all configuration options for a module. More... | |
FIELD_UTILS_EXPORT void | SetDefaults () |
Sets default configuration options for those which have not been set. More... | |
FIELD_UTILS_EXPORT void | AddFile (std::string fileType, std::string fileName) |
FIELD_UTILS_EXPORT void | EvaluateTriFieldAtEquiSpacedPts (LocalRegions::ExpansionSharedPtr &exp, const Array< OneD, const NekDouble > &infield, Array< OneD, NekDouble > &outfield) |
Static Public Member Functions | |
static std::shared_ptr< Module > | create (FieldSharedPtr f) |
Creates an instance of this class. More... | |
Static Public Member Functions inherited from Nektar::FieldUtils::ProcessBoundaryExtract | |
static std::shared_ptr< Module > | create (FieldSharedPtr f) |
Creates an instance of this class. More... | |
Static Public Attributes | |
static ModuleKey | className |
Static Public Attributes inherited from Nektar::FieldUtils::ProcessBoundaryExtract | |
static ModuleKey | className |
Protected Member Functions | |
void | v_Process (po::variables_map &vm) override |
Write mesh to output file. More... | |
std::string | v_GetModuleName () override |
std::string | v_GetModuleDescription () override |
Protected Member Functions inherited from Nektar::FieldUtils::ProcessBoundaryExtract | |
void | v_Process (po::variables_map &vm) override |
std::string | v_GetModuleName () override |
std::string | v_GetModuleDescription () override |
ModulePriority | v_GetModulePriority () override |
Protected Member Functions inherited from Nektar::FieldUtils::Module | |
Module () | |
virtual void | v_Process (po::variables_map &vm) |
virtual std::string | v_GetModuleName () |
virtual std::string | v_GetModuleDescription () |
virtual ModulePriority | v_GetModulePriority () |
virtual std::vector< ModuleKey > | v_GetModulePrerequisites () |
Private Member Functions | |
NekDouble | PntToBndElmtPntDistance (const Array< OneD, Array< OneD, NekDouble > > &pts, const int pId, const Array< OneD, Array< OneD, NekDouble > > &bndPts) |
Compute the local coordinate for the nearest point on the given 2D boundary element to the input point. More... | |
bool | LocCoordForNearestPntOnBndElmt_2D (const Array< OneD, const NekDouble > &inGloCoord, SpatialDomains::GeometrySharedPtr bndGeom, const Array< OneD, Array< OneD, NekDouble > > &pts, Array< OneD, NekDouble > &locCoord, Array< OneD, NekDouble > &gloCoord, NekDouble &dist, const NekDouble iterTol=1.0e-12, const int iterMax=51) |
Compute the local coordinate for the nearest point on the given 2D boundary element to the input point. More... | |
bool | LocCoordForNearestPntOnBndElmt (const Array< OneD, const NekDouble > &inGloCoord, SpatialDomains::GeometrySharedPtr bndGeom, Array< OneD, NekDouble > &locCoord, Array< OneD, NekDouble > &gloCoord, NekDouble &dist, const NekDouble iterTol=1.0e-12, const int iterMax=51) |
Compute the local coordinate for the nearest point on the given boundary element to the input point. The locCoord is the position to set up the body-fitted coordinate. This function works as a driver. More... | |
void | ScaledCrosssProduct (const Array< OneD, NekDouble > &vec1, const Array< OneD, NekDouble > &vec2, Array< OneD, NekDouble > &vec3) |
Compute the normalized cross product for two 2D vectors. vec3 = vec1 x vec2. More... | |
void | GetVelAndConvertToCartSys (Array< OneD, Array< OneD, NekDouble > > &vel) |
Get velocity and convert to Cartesian system, if it is still in transformed system. It is copied and modified from from ProcessGrad.cpp. More... | |
Additional Inherited Members | |
Public Attributes inherited from Nektar::FieldUtils::Module | |
FieldSharedPtr | m_f |
Field object. More... | |
Protected Attributes inherited from Nektar::FieldUtils::Module | |
std::map< std::string, ConfigOption > | m_config |
List of configuration values. More... | |
std::set< std::string > | m_allowedFiles |
List of allowed file formats. More... | |
This processing module calculates the wall shear stress and adds it as an extra-field to the output file, and writes it to a surface output file.
Definition at line 48 of file ProcessBodyFittedVelocity.h.
Nektar::FieldUtils::ProcessBodyFittedVelocity::ProcessBodyFittedVelocity | ( | FieldSharedPtr | f | ) |
Definition at line 62 of file ProcessBodyFittedVelocity.cpp.
References Nektar::FieldUtils::Module::m_config.
|
override |
Definition at line 96 of file ProcessBodyFittedVelocity.cpp.
|
inlinestatic |
Creates an instance of this class.
Definition at line 52 of file ProcessBodyFittedVelocity.h.
References Nektar::MemoryManager< DataType >::AllocateSharedPtr().
void Nektar::FieldUtils::ProcessBodyFittedVelocity::GenPntwiseBodyFittedCoordSys | ( | const int | targetBndId, |
const Array< OneD, NekDouble > | assistVec, | ||
Array< OneD, NekDouble > & | distance, | ||
Array< OneD, Array< OneD, Array< OneD, NekDouble > > > & | bfcsDir, | ||
const bool | isCheckAngle, | ||
const NekDouble | distTol = 1.0e-12 , |
||
const NekDouble | iterTol = 1.0e-12 , |
||
const NekDouble | dirTol = 1.0e-4 , |
||
const NekDouble | geoTol = 1.0e-12 |
||
) |
At each quadrature point inside the domian, compute the body-fitted coordinate system with respect to the input boundary id.
targetBndId | Target boundary id. |
assistVec | Unit assistant vector, the cross product of inward- pointing wall normalId and wihch gives of the main tangential direction of the body-fitted system. |
bfcsDir | Pointwise body-fitted coordinate system. |
isPerpendicularCondition | Flag for using perpendicular check or not |
distTol | Distance tolerence. Used to find the boundary elements for local coordinate iteration. |
iterTol | Iteration tolerence. Used to check iteration convergence. |
dirTol | Direction tolerencce. Used to check if the inner product of two unit vectors is cloes enough to 1.0. |
geoTol | Geometry tolerence. Used as the relative tolerence for local coord and distance absolute tolerence. |
Definition at line 504 of file ProcessBodyFittedVelocity.cpp.
References ASSERTL0, Vmath::Dot(), Nektar::FieldUtils::ProcessWallNormalData::GetNormals(), LocCoordForNearestPntOnBndElmt(), Nektar::FieldUtils::Module::m_f, Vmath::Neg(), PntToBndElmtPntDistance(), ScaledCrosssProduct(), Vmath::Smul(), tinysimd::sqrt(), Vmath::Vadd(), Vmath::Vcopy(), and WARNINGL1.
Referenced by v_Process().
|
private |
Get velocity and convert to Cartesian system, if it is still in transformed system. It is copied and modified from from ProcessGrad.cpp.
Definition at line 835 of file ProcessBodyFittedVelocity.cpp.
References Nektar::FieldUtils::ProcessMapping::GetMapping(), Nektar::FieldUtils::Module::m_f, Nektar::GlobalMapping::MappingSharedPtr, and Vmath::Vcopy().
Referenced by v_Process().
|
private |
Compute the local coordinate for the nearest point on the given boundary element to the input point. The locCoord is the position to set up the body-fitted coordinate. This function works as a driver.
inGloCoord | Global coordinate for the input point. |
bndGeom | Geometry of the boundary element to search from. |
locCoord | Local coordinate of the result. |
gloCoord | Global coordinate of the result. |
dist | Distance from the input point to the boundary element. |
iterTol | Iteration tolerence. |
iterMax | Max iteration steps. |
Definition at line 428 of file ProcessBodyFittedVelocity.cpp.
References ASSERTL0, LocCoordForNearestPntOnBndElmt_2D(), and Nektar::FieldUtils::Module::m_f.
Referenced by GenPntwiseBodyFittedCoordSys().
|
private |
Compute the local coordinate for the nearest point on the given 2D boundary element to the input point.
inGloCoord | Global coordinate for the input point. |
bndGeom | Geometry of the boundary element to search from. |
pts | Global coordinate of the quadrature points in the boundary element. |
locCoord | Local coordinate of the result. |
gloCoord | Global coordinate of the result. |
dist | Distance from the input point to the boundary element. |
iterTol | Iteration tolerence. |
iterMax | Max iteration steps. |
Definition at line 354 of file ProcessBodyFittedVelocity.cpp.
References tinysimd::sqrt(), and WARNINGL1.
Referenced by LocCoordForNearestPntOnBndElmt().
|
private |
Compute the local coordinate for the nearest point on the given 2D boundary element to the input point.
Compute the point-to-point distance to find the estimated cloest element.
inGloCoord | Global coordinate for the input point. |
bndGeom | Geometry of the boundary element to search from. |
pts | Global coordinate of the quadrature points in the boundary element. |
locCoord | Local coordinate of the result. |
gloCoord | Global coordinate of the result. |
dist | Distance from the input point to the boundary element. |
iterTol | Iteration tolerence. |
iterMax | Max iteration steps. |
pts | Global coordinate of the quadrature points in the inner element. |
pId | Id of the inner point of interest in the current loop. |
bndPts | Global coordinate of the quadrature points in the boundary element. |
Definition at line 313 of file ProcessBodyFittedVelocity.cpp.
References tinysimd::sqrt().
Referenced by GenPntwiseBodyFittedCoordSys().
|
private |
Compute the normalized cross product for two 2D vectors. vec3 = vec1 x vec2.
Definition at line 470 of file ProcessBodyFittedVelocity.cpp.
References tinysimd::sqrt().
Referenced by GenPntwiseBodyFittedCoordSys().
|
inlineoverrideprotectedvirtual |
Reimplemented from Nektar::FieldUtils::Module.
Definition at line 70 of file ProcessBodyFittedVelocity.h.
|
inlineoverrideprotectedvirtual |
Reimplemented from Nektar::FieldUtils::Module.
Definition at line 65 of file ProcessBodyFittedVelocity.h.
|
overrideprotectedvirtual |
Write mesh to output file.
Reimplemented from Nektar::FieldUtils::Module.
Definition at line 115 of file ProcessBodyFittedVelocity.cpp.
References ASSERTL0, Vmath::Dot(), Nektar::ParseUtils::GenerateVector(), GenPntwiseBodyFittedCoordSys(), Nektar::SpatialDomains::BoundaryConditions::GetBoundaryRegions(), GetVelAndConvertToCartSys(), Nektar::FieldUtils::Module::m_config, Nektar::FieldUtils::Module::m_f, Vmath::Smul(), tinysimd::sqrt(), Nektar::FieldUtils::ProcessBoundaryExtract::v_Process(), Vmath::Vadd(), Vmath::Vcopy(), and Vmath::Vmul().
|
static |
Definition at line 56 of file ProcessBodyFittedVelocity.h.