31 #include "volFields.H" 
   32 #include "addToRunTimeSelectionTable.H" 
   38     const DimensionedField<vector, volMesh>& iF)
 
   39     : fixedValueFvPatchVectorField(
p, iF),
 
   51     const DimensionedField<vector, volMesh>& iF,
 
   52     const dictionary& dict)
 
   53     : fixedValueFvPatchVectorField(
p, iF),
 
   54       U0_(dict.lookupOrDefault<scalar>(
"U0", 0.0)),
 
   55       URate_(dict.lookupOrDefault<scalar>(
"URate", 0.0)),
 
   56       flowComponent_(dict.lookupOrDefault<label>(
"flowComponent", 0)),
 
   57       normalComponent_(dict.lookupOrDefault<label>(
"normalComponent", 1)),
 
   58       alpha0_(dict.lookupOrDefault<scalar>(
"alpha0", 0.0)),
 
   59       alphaRate_(dict.lookupOrDefault<scalar>(
"alphaRate", 0.0))
 
   62     if (dict.found(
"value"))
 
   64         fvPatchVectorField::operator=(
 
   65             vectorField(
"value", dict, 
p.size()));
 
   76     const DimensionedField<vector, volMesh>& iF,
 
   77     const fvPatchFieldMapper& mapper)
 
   78     : fixedValueFvPatchVectorField(
p, iF),
 
   81       flowComponent_(ptf.flowComponent_),
 
   82       normalComponent_(ptf.normalComponent_),
 
   84       alphaRate_(ptf.alphaRate_)
 
   91     : fixedValueFvPatchVectorField(wbppsf),
 
   93       URate_(wbppsf.URate_),
 
   94       flowComponent_(wbppsf.flowComponent_),
 
   95       normalComponent_(wbppsf.normalComponent_),
 
   96       alpha0_(wbppsf.alpha0_),
 
   97       alphaRate_(wbppsf.alphaRate_)
 
  104     const DimensionedField<vector, volMesh>& iF)
 
  105     : fixedValueFvPatchVectorField(wbppsf, iF),
 
  107       URate_(wbppsf.URate_),
 
  108       flowComponent_(wbppsf.flowComponent_),
 
  109       normalComponent_(wbppsf.normalComponent_),
 
  110       alpha0_(wbppsf.alpha0_),
 
  111       alphaRate_(wbppsf.alphaRate_)
 
  120     const scalar t = this->db().time().timeOutputValue();
 
  121     scalar alpha = alpha0_ + t * alphaRate_;
 
  122     scalar 
U = U0_ + t * URate_;
 
  124     vectorField& thisPatchRef = *
this;
 
  125     vectorField thisPatch = thisPatchRef;
 
  128         thisPatch[idxI][flowComponent_] = 
U * cos(alpha);
 
  129         thisPatch[idxI][normalComponent_] = 
U * sin(alpha);
 
  132     fvPatchVectorField::operator==(thisPatch);
 
  134     fixedValueFvPatchVectorField::updateCoeffs();
 
  139     fixedValueFvPatchVectorField::write(os);
 
  140     os.writeEntry(
"U0", U0_);
 
  141     os.writeEntry(
"URate", URate_);
 
  142     os.writeEntry(
"flowComponent", flowComponent_);
 
  143     os.writeEntry(
"normalComponent", normalComponent_);
 
  144     os.writeEntry(
"alpha0", alpha0_);
 
  145     os.writeEntry(
"alphaRate", alphaRate_);