1. 15 Dec, 2021 18 commits
  2. 14 Dec, 2021 4 commits
    • sergio's avatar
      ee36fe8c
    • Andrew Heather's avatar
      Merge branch 'feature-propeller-info' into 'develop' · bc192e24
      Andrew Heather authored
      Added new propellerInfo function object
      
      See merge request !519
      bc192e24
    • Andrew Heather's avatar
      TUT: propeller - added example use of propellerInfo function object · fd257cb0
      Andrew Heather authored and Andrew Heather's avatar Andrew Heather committed
      fd257cb0
    • Andrew Heather's avatar
      ENH: Added new propellerInfo function object · 734a3143
      Andrew Heather authored and Andrew Heather's avatar Andrew Heather committed
      Calculates propeller performance and wake field properties.
      
      Controlled by executeControl:
      - Propeller performance
        - Thrust coefficient, Kt
        - Torque coefficient, 10*Kq
        - Advance coefficient, J
        - Open water efficiency, etaO
        - Written to postProcessing/<name>/<time>/propellerPerformance.dat
      
      Controlled by writeControl:
      - Wake field text file
        - Wake: 1 - UzMean/URef
        - Velocity in cylindrical coordinates at xyz locations
        - Written to postProcessing/<name>/<time>/wake.dat
      - Axial wake field text file
        - 1 - Uz/URef at r/R and angle
        - Written to postProcessing/<name>/<time>/axialWake.dat
      - Velocity surface
        - Written to postProcessing/<name>/surfaces/time>/disk.<fileType>
      
      Usage
      
          Example of function object specification:
          \verbatim
          propellerInfo1
          {
              type            propellerInfo;
              libs            (forces);
              writeControl    writeTime;
      
              patches         ("propeller.*");
      
              URef            5; // Function1 type; 'constant' form shown here
              rho             rhoInf; // incompressible
              rhoInf          1.2;
      
              // Optionally write propeller performance data
              writePropellerPerformance yes;
      
              // Propeller data:
      
              // Radius
              radius          0.1;
      
              rotationMode    specified; // specified | MRF
      
              // rotationMode = specified:
              origin          (0 -0.1 0);
              n               25.15;
              axis            (0 1 0);
      
              // Optional reference direction for angle (alpha) = 0
              alphaAxis       (1 0 0);
      
              //// rotationMode = mrf
              //// MRF             MRFZoneName;
              //// (origin, n and axis retrieved from MRF model)
      
              // Optionally write wake text files
              // Note: controlled by writeControl
              writeWakeFields yes;
      
              // Sample plane (disk) properties
              // Note: controlled by writeControl
              sampleDisk
              {
                  surfaceWriter   vtk;
                  r1              0.05;
                  r2              0.2;
                  nTheta          36;
                  nRadial         10;
                  interpolationScheme cellPoint;
                  errorOnPointNotFound false;
              }
          }
          \endverbatim
      
          Where the entries comprise:
          \table
              Property        | Description                   | Required | Deflt value
              type            | Type name: propellerInfo      | yes      |
              log             | Write to standard output      | no       | no
              patches         | Patches included in the forces calculation | yes |
              p               | Pressure field name           | no       | p
              U               | Velocity field name           | no       | U
              rho             | Density field name            | no       | rho
              URef            | Reference velocity            | yes      |
              rotationMode    | Rotation mode (see below)     | yes      |
              origin          | Sample disk centre            | no*      |
              n               | Revolutions per second        | no*      |
              axis            | Propeller axis                | no*      |
              alphaAxis       | Axis that defines alpha=0 dir | no       |
              MRF             | Name of MRF zone              | no*      |
              originOffset    | Origin offset for MRF mode    | no       | (0 0 0)
              writePropellerPerformance| Write propeller performance text file | yes |
              writeWakeFields | Write wake field text files   | yes      |
              surfaceWriter   | Sample disk surface writer    | no*      |
              r1              | Sample disk inner radius      | no       | 0
              r2              | Sample disk outer radius      | no*      |
              nTheta          | Divisions in theta direction  | no*      |
              nRadial         | Divisions in radial direction | no*      |
              interpolationScheme | Sampling interpolation scheme | no* | cell
          \endtable
      
      Note
      - URef is a scalar Function1 type, i.e. supports constant, table, lookup values
      - rotationMode is used to set the origin, axis and revolutions per second
        - if set to 'specified' all 3 entries are required
          - note: origin is the sample disk origin
        - if set to 'MRF' only the MRF entry is required
          - to move the sample disk away from the MRF origin, use the originOffset
      - if writePropellerPerformance is set to on|true:
        - propellerPerformance text file will be written
      - if writeWakeFields is set to on|true:
        - wake and axialWake text files will be written
      - if the surfaceWriter entry is set, the sample disk surface will be written
        - extents set according to the r1 and r2 entries
        - discretised according to the nTheta and nRadial entries
      734a3143
  3. 13 Dec, 2021 13 commits
  4. 10 Dec, 2021 5 commits
    • Andrew Heather's avatar
      COMP: Added missed file · c46216e6
      Andrew Heather authored
      c46216e6
    • mattijs's avatar
    • Andrew Heather's avatar
      Merge branch 'feature-fvExpressionField' into 'develop' · 33b2e0df
      Andrew Heather authored
      New "exprField" function object
      
      See merge request !516
      33b2e0df
    • Mark Olesen's avatar
      ENH: add exprField function object · 8d4ad043
      Mark Olesen authored and Andrew Heather's avatar Andrew Heather committed
      - provides a simple means of defining/modifying fields. For example,
      
        ```
        <name1>
        {
            type    exprField;
            libs    (fieldFunctionObjects);
            field   pTotal;
      
            expression  "p + 0.5*(rho*magSqr(U))";
            dimensions  [ Pa ];
        }
        ```
        It is is also possible to modify an existing field.
        For example, to modify the previous one.
        ```
        <name2>
        {
            type    exprField;
            libs    (fieldFunctionObjects);
            field   pTotal;
            action  modify;
      
            // Static pressure only in these regions
            fieldMask
            #{
                (mag(pos()) < 0.05) && (pos().y() > 0)
             || cellZone(inlet)
            #};
            expression  "p";
        }
        ```
      
        To use as a simple post-process calculator, simply avoid storing the
        result and only generate on write:
        ```
        <name2>
        {
            store            false;
            executionControl none;
            writeControl     writeTime;
            ...
        }
        ```
      8d4ad043
    • Mark Olesen's avatar
      STYLE: qualify expression debug flags · a6cbfcb9
      Mark Olesen authored and Andrew Heather's avatar Andrew Heather committed
      - for debug/tracing handle the following keywords:
      
         * debug.driver   (was "debugBaseDriver")
         * debug.scanner  (was "debugScanner")
         * debug.parser   (was "debugParser")
      a6cbfcb9