SlideShare une entreprise Scribd logo
1  sur  1
Télécharger pour lire hors ligne
#ifndef rotatingWallVelocityFvPatchVectorField_H
#define rotatingWallVelocityFvPatchVectorField_H
#include "fixedValueFvPatchFields.H"
#include "DataEntry.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
/*---------------------------------------------------------------------------*¥
Class rotatingWallVelocityFvPatchVectorField Declaration
¥*---------------------------------------------------------------------------*/
class rotatingWallVelocityFvPatchVectorField
:
public fixedValueFvPatchVectorField
{
// Private data
//- Origin of the rotation
vector origin_;
//- Axis of the rotation
vector axis_;
//- Rotational speed
autoPtr<DataEntry<scalar> > omega_;
public:
 In header file (.H)
• Including “DataEntry.H” file
• Defining time-varying parameter
 In source file (.C)
• Reading the parameter
• Calculating the parameter value
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::rotatingWallVelocityFvPatchVectorField::
rotatingWallVelocityFvPatchVectorField
(
const fvPatch& p,
const DimensionedField<vector, volMesh>& iF,
const dictionary& dict
)
:
fixedValueFvPatchField<vector>(p, iF),
origin_(dict.lookup("origin")),
axis_(dict.lookup("axis")),
omega_(DataEntry<scalar>::New("omega", dict))
{
if (dict.found("value"))
{
fvPatchField<vector>::operator=
(
vectorField("value", dict, p.size())
);
}
else
{
// Evaluate the wall velocity
updateCoeffs();
}
}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
void Foam::rotatingWallVelocityFvPatchVectorField::updateCoeffs()
{
if (updated())
{
return;
}
const scalar t = this->db().time().timeOutputValue();
scalar om = omega_->value(t);
// Calculate the rotating wall velocity from the specification of the motion
const vectorField Up
(
(-om)*((patch().Cf() - origin_) ^ (axis_/mag(axis_)))
);
// Remove the component of Up normal to the wall
// just in case it is not exactly circular
const vectorField n(patch().nf());
vectorField::operator=(Up - n*(n & Up));
fixedValueFvPatchVectorField::updateCoeffs();
}
Time-Dependent BCs
in OpenFOAM
BCs with time-varying options
Source Code (rotatingWallVelocity)
 Ref.: Release Note Version 2.1.0
 uniformFixedValue
General fixed value condition with time-
varying value (uniformValue)
 rotatingWallVelocity
Velocity condition for a rotating boundary
with time-varying angular velocity [rad/s]
(omega)
 flowRateInletVelocity
Inlet velocity condition with time-varying
flow-rate (volumetricFlowRate or
massFlowRate)
 a good many others
Examples of BC Specification
inlet
{
type uniformFixedValue;
uniformValue table
(
(0 (10 0 0))
(0.1 (12 0 0))
(0.2 (12 0 0))
(0.3 (11 0 0))
);
}
Ux [m/s]
Time [s]
rotatingWallVelocityFvPatchVectorField.H
rotatingWallVelocityFvPatchVectorField.C
1
2
1
2
3
4
3
4

Contenu connexe

En vedette

Dynamic Mesh in OpenFOAM
Dynamic Mesh in OpenFOAMDynamic Mesh in OpenFOAM
Dynamic Mesh in OpenFOAM
Fumiya Nozaki
 
OpenFOAM Programming Tips
OpenFOAM Programming TipsOpenFOAM Programming Tips
OpenFOAM Programming Tips
Fumiya Nozaki
 
OpenFOAM の cyclic、cyclicAMI、cyclicACMI 条件について
OpenFOAM の cyclic、cyclicAMI、cyclicACMI 条件についてOpenFOAM の cyclic、cyclicAMI、cyclicACMI 条件について
OpenFOAM の cyclic、cyclicAMI、cyclicACMI 条件について
Fumiya Nozaki
 
OpenFoam Simulation of Flow over Ahmed Body using Visual CFD software
OpenFoam Simulation of Flow over Ahmed Body using Visual CFD softwareOpenFoam Simulation of Flow over Ahmed Body using Visual CFD software
OpenFoam Simulation of Flow over Ahmed Body using Visual CFD software
Srinivas Nag H.V
 
CAESES-FFW,GridPro,OpenFOAMを使用した形状最適化事例#1
CAESES-FFW,GridPro,OpenFOAMを使用した形状最適化事例#1CAESES-FFW,GridPro,OpenFOAMを使用した形状最適化事例#1
CAESES-FFW,GridPro,OpenFOAMを使用した形状最適化事例#1
Fumiya Nozaki
 
OpenFOAM の境界条件をまとめよう!
OpenFOAM の境界条件をまとめよう!OpenFOAM の境界条件をまとめよう!
OpenFOAM の境界条件をまとめよう!
Fumiya Nozaki
 
CAESES Free チュートリアル
CAESES Free チュートリアルCAESES Free チュートリアル
CAESES Free チュートリアル
Fumiya Nozaki
 
Limited Gradient Schemes in OpenFOAM
Limited Gradient Schemes in OpenFOAMLimited Gradient Schemes in OpenFOAM
Limited Gradient Schemes in OpenFOAM
Fumiya Nozaki
 

En vedette (20)

Dynamic Mesh in OpenFOAM
Dynamic Mesh in OpenFOAMDynamic Mesh in OpenFOAM
Dynamic Mesh in OpenFOAM
 
OpenFOAM Programming Tips
OpenFOAM Programming TipsOpenFOAM Programming Tips
OpenFOAM Programming Tips
 
無償のモデリングソフトウェアCAESESを使ってみた
無償のモデリングソフトウェアCAESESを使ってみた無償のモデリングソフトウェアCAESESを使ってみた
無償のモデリングソフトウェアCAESESを使ってみた
 
blockCoupledSwirlTestチュートリアル
blockCoupledSwirlTestチュートリアルblockCoupledSwirlTestチュートリアル
blockCoupledSwirlTestチュートリアル
 
OpenFOAM の cyclic、cyclicAMI、cyclicACMI 条件について
OpenFOAM の cyclic、cyclicAMI、cyclicACMI 条件についてOpenFOAM の cyclic、cyclicAMI、cyclicACMI 条件について
OpenFOAM の cyclic、cyclicAMI、cyclicACMI 条件について
 
A first order hyperbolic framework for large strain computational computation...
A first order hyperbolic framework for large strain computational computation...A first order hyperbolic framework for large strain computational computation...
A first order hyperbolic framework for large strain computational computation...
 
OpenFOAM for beginners: Hands-on training
OpenFOAM for beginners: Hands-on trainingOpenFOAM for beginners: Hands-on training
OpenFOAM for beginners: Hands-on training
 
OpenFoam Simulation of Flow over Ahmed Body using Visual CFD software
OpenFoam Simulation of Flow over Ahmed Body using Visual CFD softwareOpenFoam Simulation of Flow over Ahmed Body using Visual CFD software
OpenFoam Simulation of Flow over Ahmed Body using Visual CFD software
 
CAESES-FFW,GridPro,OpenFOAMを使用した形状最適化事例#1
CAESES-FFW,GridPro,OpenFOAMを使用した形状最適化事例#1CAESES-FFW,GridPro,OpenFOAMを使用した形状最適化事例#1
CAESES-FFW,GridPro,OpenFOAMを使用した形状最適化事例#1
 
Large strain computational solid dynamics: An upwind cell centred Finite Volu...
Large strain computational solid dynamics: An upwind cell centred Finite Volu...Large strain computational solid dynamics: An upwind cell centred Finite Volu...
Large strain computational solid dynamics: An upwind cell centred Finite Volu...
 
OpenFOAMのチュートリアルを作ってみた#1 『くさび油膜効果の計算』
OpenFOAMのチュートリアルを作ってみた#1 『くさび油膜効果の計算』OpenFOAMのチュートリアルを作ってみた#1 『くさび油膜効果の計算』
OpenFOAMのチュートリアルを作ってみた#1 『くさび油膜効果の計算』
 
OpenFOAM の境界条件をまとめよう!
OpenFOAM の境界条件をまとめよう!OpenFOAM の境界条件をまとめよう!
OpenFOAM の境界条件をまとめよう!
 
Large strain solid dynamics in OpenFOAM
Large strain solid dynamics in OpenFOAMLarge strain solid dynamics in OpenFOAM
Large strain solid dynamics in OpenFOAM
 
OpenFOAM v2.3.0のチュートリアル 『oscillatingInletACMI2D』
OpenFOAM v2.3.0のチュートリアル 『oscillatingInletACMI2D』OpenFOAM v2.3.0のチュートリアル 『oscillatingInletACMI2D』
OpenFOAM v2.3.0のチュートリアル 『oscillatingInletACMI2D』
 
CAESES Free チュートリアル
CAESES Free チュートリアルCAESES Free チュートリアル
CAESES Free チュートリアル
 
Avinash_PPT
Avinash_PPTAvinash_PPT
Avinash_PPT
 
OpenFOAM -回転領域を含む流体計算 (Rotating Geometry)-
OpenFOAM -回転領域を含む流体計算 (Rotating Geometry)-OpenFOAM -回転領域を含む流体計算 (Rotating Geometry)-
OpenFOAM -回転領域を含む流体計算 (Rotating Geometry)-
 
OpenFOAM の Function Object 機能について
OpenFOAM の Function Object 機能についてOpenFOAM の Function Object 機能について
OpenFOAM の Function Object 機能について
 
Limited Gradient Schemes in OpenFOAM
Limited Gradient Schemes in OpenFOAMLimited Gradient Schemes in OpenFOAM
Limited Gradient Schemes in OpenFOAM
 
OpenFOAM を用いた Adjoint 形状最適化事例1
OpenFOAM を用いた Adjoint 形状最適化事例1OpenFOAM を用いた Adjoint 形状最適化事例1
OpenFOAM を用いた Adjoint 形状最適化事例1
 

Dernier

Dernier (20)

UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1
 
Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024
 
THE BEST IPTV in GERMANY for 2024: IPTVreel
THE BEST IPTV in  GERMANY for 2024: IPTVreelTHE BEST IPTV in  GERMANY for 2024: IPTVreel
THE BEST IPTV in GERMANY for 2024: IPTVreel
 
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
 
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
 
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptxWSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
 
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
 
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdfSimplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
 
A Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System StrategyA Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System Strategy
 
IESVE for Early Stage Design and Planning
IESVE for Early Stage Design and PlanningIESVE for Early Stage Design and Planning
IESVE for Early Stage Design and Planning
 
WebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceWebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM Performance
 
Optimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through ObservabilityOptimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through Observability
 
Connecting the Dots in Product Design at KAYAK
Connecting the Dots in Product Design at KAYAKConnecting the Dots in Product Design at KAYAK
Connecting the Dots in Product Design at KAYAK
 
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxUnpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
 
Speed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in MinutesSpeed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in Minutes
 
Designing for Hardware Accessibility at Comcast
Designing for Hardware Accessibility at ComcastDesigning for Hardware Accessibility at Comcast
Designing for Hardware Accessibility at Comcast
 
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdfThe Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
 
Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024
 
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdfIntroduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
 
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
 

Time-Dependent Boundary Conditions in OpenFOAM

  • 1. #ifndef rotatingWallVelocityFvPatchVectorField_H #define rotatingWallVelocityFvPatchVectorField_H #include "fixedValueFvPatchFields.H" #include "DataEntry.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { /*---------------------------------------------------------------------------*¥ Class rotatingWallVelocityFvPatchVectorField Declaration ¥*---------------------------------------------------------------------------*/ class rotatingWallVelocityFvPatchVectorField : public fixedValueFvPatchVectorField { // Private data //- Origin of the rotation vector origin_; //- Axis of the rotation vector axis_; //- Rotational speed autoPtr<DataEntry<scalar> > omega_; public:  In header file (.H) • Including “DataEntry.H” file • Defining time-varying parameter  In source file (.C) • Reading the parameter • Calculating the parameter value // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // Foam::rotatingWallVelocityFvPatchVectorField:: rotatingWallVelocityFvPatchVectorField ( const fvPatch& p, const DimensionedField<vector, volMesh>& iF, const dictionary& dict ) : fixedValueFvPatchField<vector>(p, iF), origin_(dict.lookup("origin")), axis_(dict.lookup("axis")), omega_(DataEntry<scalar>::New("omega", dict)) { if (dict.found("value")) { fvPatchField<vector>::operator= ( vectorField("value", dict, p.size()) ); } else { // Evaluate the wall velocity updateCoeffs(); } } // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // void Foam::rotatingWallVelocityFvPatchVectorField::updateCoeffs() { if (updated()) { return; } const scalar t = this->db().time().timeOutputValue(); scalar om = omega_->value(t); // Calculate the rotating wall velocity from the specification of the motion const vectorField Up ( (-om)*((patch().Cf() - origin_) ^ (axis_/mag(axis_))) ); // Remove the component of Up normal to the wall // just in case it is not exactly circular const vectorField n(patch().nf()); vectorField::operator=(Up - n*(n & Up)); fixedValueFvPatchVectorField::updateCoeffs(); } Time-Dependent BCs in OpenFOAM BCs with time-varying options Source Code (rotatingWallVelocity)  Ref.: Release Note Version 2.1.0  uniformFixedValue General fixed value condition with time- varying value (uniformValue)  rotatingWallVelocity Velocity condition for a rotating boundary with time-varying angular velocity [rad/s] (omega)  flowRateInletVelocity Inlet velocity condition with time-varying flow-rate (volumetricFlowRate or massFlowRate)  a good many others Examples of BC Specification inlet { type uniformFixedValue; uniformValue table ( (0 (10 0 0)) (0.1 (12 0 0)) (0.2 (12 0 0)) (0.3 (11 0 0)) ); } Ux [m/s] Time [s] rotatingWallVelocityFvPatchVectorField.H rotatingWallVelocityFvPatchVectorField.C 1 2 1 2 3 4 3 4