Compare commits

..

128 Commits

Author SHA1 Message Date
7f5aae75e0 BUG: parse issues for nastran long format (closes #589) 2017-09-15 10:55:27 +02:00
ba8fa9f2ca wmake/scripts/wmakeFunctions: Add support for $WM_PROJECT_DIR being a link 2016-06-15 14:22:33 +01:00
e8885c868d BUG: incorrect fall-through in directionalPressureGradientExplicitSource (fixes #486) 2017-05-29 15:36:44 +02:00
cc676d1820 BUG: foamToEnsight fails with missing field at time 0 (fixes #473) 2017-05-16 17:53:29 +02:00
61ea8936bb BUG: Corrected compilation errors 2017-04-19 13:56:55 +01:00
e6695e7354 BUG: typo in addProfiling0 macro (fixes #446) 2017-04-07 07:46:17 +02:00
79d4e466a2 BUG: in wordRe::operator=(const keyType&)
- the regex was not being unset on assignment.
- drop unused recompile() method as being dubious
2017-03-10 13:05:35 +01:00
085ff44ea4 BUG: meshToMesh - corrected indexing of cutting patches. See #376 2017-01-10 17:04:12 +00:00
967a5c2216 BUG: turbulentDFSEMInlet BC - corrected singleProc usage for parallel runs. Fixes #374 2017-01-06 11:00:58 +00:00
983a1d1b15 Adding autoPtr clone constructors and correcting T.oldTime() 2016-12-13 13:30:42 -08:00
3d7b6bdba2 BUG: Fixing oldTime Tw and Reference Value of humidityTemperatureCoupledMixed BC 2016-12-13 09:44:25 -08:00
8d7379bc72 BUG: surfaceNoise - corrected fftWriteInterval operation 2016-12-06 16:19:01 +00:00
9d168b2b8e ENH: Changes in handling topological changes in VOF solvers
1) Using divU instead of fvc::absolute(phi,U) in TEqn as the latter uses latest time meshPhi which is inconsistent
2) Adding fvc::interpolate(U) when topo changes
3) in pEq for compressible dgdt is updated using the latest rho1 and rho2 after compressible effects are considered
2016-12-07 12:57:32 -08:00
24a6c4810d ENH: Lagrangian models - added headers to enable derived libraries to compile 2016-11-29 09:10:37 +00:00
c97b1f21e1 STYLE: porosityModel - minor cleanup of bounds output 2016-11-21 09:44:00 +00:00
c7ec42c3da BUG: Following issue 284 for particle switching processors flag 2016-11-21 11:54:31 -08:00
1497394c7a ENH: Adding writing of the motionSolver dictionary for sixDoFRigidBodyDisplacementPointPatchVectorField BC 2016-11-17 08:46:27 -08:00
b70b0bb5cb ENH: Porosity model - output cellZone bounds in the local co-ordinate system. Fixes #300 2016-11-17 13:35:35 +00:00
e661d2382f Correcting header information for IDDESDelta 2016-11-17 08:41:08 -08:00
331d24ed0c ENH: consistent output format for coupled geometry description (issue #278)
- In the corner case with few faces or points, the normal List I/O
  results in a compact list representation.

  This is less than desirable for external programs with simple
  line-based parsers.

- Write exactly the following

*Faces*
// Patch: <word-Region> <word-Patch>
<int-nFaces>
(
<int-faceSize>(<int> .. <int>)
...
)

*Points*
// Patch: <word-Region> <word-Patch>
<int-nPoints>
(
(<float-x> <float-y> <float-z>)
...
)

STYLE: only use serial form of createExternalCoupledPatchGeometry in tutorial

- less confusing for the user, who wonders why it is being done twice.
2016-11-02 17:26:25 +01:00
a79eaa2d64 ENH: provide separate geometry description per region/patch (issue #278)
- Also fixed bug noted in issue #269

- Previous implementation had all faces together, which made
  it difficult (impossible) for external applications to
  figure out which geometry was being referred to.

- Provide separate region/patches as follows:

    // Patch: <regionName> <patchName>

  For example,

    // Group: coupleGroup
    // Patch: heater minY
    8( ... )

  The region-name is always present, even if there is only one region.

- This change is a partial reversion to the behaviour in 2.4.x, except
  that we can now also handle multi-region geometries.

  Changing the leading comment from "# " to "// " facilitates parsing
  of the files with OpenFOAM itself if necessary.
2016-10-25 15:43:46 +02:00
19b5952c35 ENH: enable 'status=done' when finishing an externalCoupled FO
- This provides a mechanism for the external code to detect when
  OpenFOAM is done.

- Adjust tutorial to use the mechanism. Also test in parallel.
2016-10-25 15:43:27 +02:00
83db6f793c BUG: resolve some decomposeParDict problems (issues #60, #265).
- Cleanup/centralize handling of -decomposeParDict by relocating
  common code into argList. Ensures that all processes receive
  identical information about the -decomposeParDict opton.

- Only use alternative decomposeParDict for simpleFoam/motorBike
  tutorial so that this will be included in the test loop for snappy.

- Added Mattijs' fix for surfaceRedistributePar.
2016-10-25 18:19:19 +02:00
c9e9815b86 ENh: Adding clone member to sixDoFSolvers 2016-10-26 14:53:26 -07:00
1ff9ae9ff5 ENH: setTimeStep: adjust timestep for adjustableRunTime writeInterval. Fixes #268. 2016-10-24 13:07:51 +01:00
1f408ffd1b ENH: effectivenessHeatExchangerSource - calculate upstream average temperature by default 2016-10-26 15:54:03 +01:00
1df1f8fe20 STYLE: adjust mergePoints to ease adoption of different list types (issue #250)
- A preliminary minor adjustment only.
2016-10-19 10:42:47 +02:00
dad301d81c BUG: foamCleanPath problem if path contains @ (closes #264)
- Can occur with some user names, or mounted paths.
  Resolve by using '?' for the separation character.

  Since '?' is a shell-glob, it is highly unlikely to occur appear in
  filenames.  Additionally, it is not a meta-character in standard sed,
  nor in the GNU extension (which uses '\?').
2016-10-18 09:52:37 +02:00
779f884355 COMP: compile issue with gcc-5.2 (closes #273)
- Superfluous #include "FieldFunctions.H" provokes warnings/errors
  with newer gcc.
2016-10-17 21:50:30 +02:00
5682eb6035 BUG: snappyHexMesh: findCellZoneTopo was copying same value but still setting
changed flag which caused infinite while loop. Background info:
- findCellZoneTopo tries to find for all named surface intersections
which side of the face is in the faceZone
- i.e. it tries to make the cellZone consistent with the faceZone
(to fix small problems)
- this had some logic to assign the neighbour cellZone to the owner cellZone
- which didn't check for the neighbour being the same value as the owner
- but still set a 'changed' flag which caused the loop to never end.
2016-10-17 12:25:03 +01:00
a5e1c11a4b ENH: subTriSurfaceMesh: fixed comment 2016-10-17 12:24:11 +01:00
2b5e278ffc STYLE: Corrected typo 2016-10-19 13:20:18 +01:00
b386d8a1c2 ENH: gmshToFoam: Updated for line entries 2016-10-19 13:20:02 +01:00
9cfce48c9c ENH: noiseModel: Updated check for uniform time step size 2016-10-19 13:19:34 +01:00
8f7ad9130a ENH: wallDist - suppress calc if updateInterval is zero 2016-09-30 11:47:38 +01:00
0ceb2cd230 ENH: wallDist - added option to evaluate every XXX steps 2016-09-28 16:59:57 +01:00
025eebca13 ENH: provide direct access to raw pointer/reference from autoPtr (issue #252)
All of the access methods for autoPtr include validity checks and will
fail if the underlying point is NULL. In some cases, however, we'd
like to retain the automatic deletion mechanism, but still address a
nullptr. This is mostly for cases in which a file-stream should be
allocated, but only on the master process. For these cases we'd still
like to pass through and reference the underlying pointer (eg, to
obtain the correct method call) without tripping the pointer check
mechanism. If we attempt to use the ptr() method, the autoPtr memory
management is bypassed and we risk memory leaks.

Instead provide an alternative mechanism to obtain the raw underlying
pointers/references. Use rawPtr() and rawRef() for these potentially
useful, but also potentially dangerous, operations.
2016-10-03 16:38:19 +02:00
a5ff48870f ENH: surfaceCheck: added -outputThreshold option to manage file writing 2016-10-03 13:55:30 +01:00
59418c711a STYLE: Added header documentation to function 2016-09-29 10:30:30 +01:00
4093fcd66b ENH: provide refOrNull method for autoPtr.
- Normally use '()' to deference. This has extra safety and issues a
  fatal error if the underlying pointer is not valid.

  However, in some cases we are happy with getting a null reference.
  The refOrNull() method returns the reference without any checking.

  Usage example:

      autoPtr<OFstream> osPtr;
      if (Pstream::master())
      {
          osPtr.reset(new OFstream(...));
      }
      writeViaMaster(osPtr.refOrNull());

      - The writeViaMaster() call takes an OFstream reference,
        but this is only used directly on the master.
        The slaves will pass things through to the master.
2016-09-28 11:26:42 +02:00
85885adea8 ENH: provide list of enums for NamedEnum
- can be used to loop over all enumerations in the order of definition.
2016-09-27 12:40:17 +02:00
26b6f93b33 ENH: distributedTriSurfaceMesh: bail out if getting stuck due to precision errors 2016-09-28 12:26:23 +01:00
67970d02b6 STYLE: minor adjustment to echoed information 2016-09-26 08:02:03 +02:00
9fbb796135 Fix tensor names in foamToEnsightParts case file (fixes #243) 2016-09-26 07:41:02 +02:00
fbc1a1d82a ENH: reduce startup time for foamToVTK conversion
- Similar to ensight converters (issue #240),
  improve speed for detection of lagrangian clouds.

- provide a -noLagrangian option for symmetry
2016-09-23 18:45:06 +02:00
7d2ea92570 ENH: reduce startup time for ensight conversion (issue #240).
- Less looping when detecting lagrangian clouds and their fields.

- Avoid using Time::setTime() and IOobjectList in tight loops.
  They both kill performance immensely.

ENH: provide a -noLagrangian option to foamToEnsight and foamToEnsightParts
for even more control.
2016-09-23 17:45:47 +02:00
af13209920 STYLE: add OpenFOAM version to ensight geom file description.
- More informative than a horizonal line, can help when debugging.

STYLE: remove unused write field methods from ensightParts
2016-09-23 14:53:01 +02:00
53ed99b084 BUG: ensight output failing with dimensioned field (fixes #244)
- The new field needs initialization with a dimensioned<Type> not just
  the dimensionSet.

- The new field was also incorrectly being registered, which could
  cause issues later.
2016-09-23 13:13:12 +02:00
6f4509b938 BUG: incorrect symmTensor order for some ensight output (fixes #243)
- affects foamToEnsightParts, sampled surfaces

- Use ensightPTraits mechanism throughout to avoid this issue
2016-09-23 09:10:57 +02:00
4e5d2d8e04 ENH: improve startup time for foamToEnsight conversion (issue #240).
Old code:
    Found 10990 time steps
    Search for moving mesh ... no moving mesh detected.
    Startup in 329.09 s

Updated:
    Found 10990 time steps
    Search for moving mesh ... no moving mesh detected.
    Startup in 1.6 s

- Cause was checking "polyMesh/points" via an IOobject.
  Short-circuit with a check for a polyMesh/ directory first.

  Limit the check to the master-node as well to further reduce
  load on the file-system.

------------------------------

ENH: improve per-step conversion times for foamToEnsight.

Old code:
    Converting 11001 time steps
    Time [0] = 0       Wrote in 1.53 s
    Time [1] = 1       Wrote in 1.52 s
    ...
    Time [100] = 100   Elapsed time 205.35 s

Updated:
    Converting 11001 time steps
    Time [0] = 0       Wrote in 1.4 s
    Time [1] = 1       Wrote in 0.07 s
    ...
    Time [100] = 100   Elapsed time 42.4 s

- Speedup by hashing test results from the first conversion step
  instead of checking each time.

  Check data on all nodes to avoid problems with incomplete writes.

------------------------------

BUG: moving mesh detection failed for foamToEnsightParts

- adjusted to agree with updated foamToEnsight

------------------------------

Note:

- foamToEnsightParts (serial) still has about twice the throughput of
  foamToEnsight.
2016-09-21 18:15:19 +02:00
b0d1deeb69 ENH: fvc: instantiating 2D volVectorField 2016-09-20 17:07:30 +01:00
008a583992 BUG: output field name instead of field (fixes #224) 2016-09-20 15:15:19 +05:30
b4f050ad52 ENH: more flexible selection/naming for ddt2 FO (issue #224)
- bugfix (empty patches), and added detection of steady-state
  scheme.

Caveat: when called via execFlowFunctionObjects will always produce a
  zero field, since the oldTime field is not available for this mode.
2016-09-16 14:49:47 +02:00
a5fbb36d73 ENH: runTime calculation of zeroGradient volume fields (issue #235)
Extrapolate internal field to walls for post-processing.
Uses as new syntax for handling the naming of multiple fields.

The input fields are selected via a wordReList.
For example,

    fields      (U "(T|k|epsilon|omega)");

The names of the resulting output fields use placeholder tokens for
flexibility. For example,

    result      zeroGradient(@@);

The '@@' placeholder is replaced by the name of the input field.
Eg,
    fields      (U T);
    result      zeroGradient(@@);
->  zeroGradient(U), zeroGradient(T)

Or,
    fields      (U T);
    result      @@nearWall;
->  UnearWall, TnearWall

NOTE:
    The function object will skip over fields that only have
    processor, empty, zeroGradient patches. The operation does not
    make much sense for these, and it avoids inadvertently
    re-processing fields twice.
2016-09-16 21:33:40 +02:00
3aa54d114d ENH: runTime calculation of (dp/dt)^2 - issue #224
- implemented using magSqr() instead of sqr().
  For scalar fields they are the same, but can be useful
  if this function object is extended for more field types.
2016-09-14 14:02:40 +02:00
a70e4ef8fe ENH: expand data mask for foamToEnsight (issue #231)
- Default is a width of 8 characters, but this can be extended up to 31
  characters via the '-width' command-line option.

- Now use a similar structure as foamToEnsightParts for the masking.
  This reduces the clutter within the directory, makes it easier to
  selectively delete some time steps (using shell commands).

- Added in a "time" information data in each sub-directory to
  make it possible to reconstruct the case file with an external
  script.

- Conversion of cloud data should now also work in parallel
  (may need more testing).

- Support binary output for cloud data.

- Better avoidance of illegal ensight variable names.
  But still partially incomplete (due to patch fields).

==================================================
Example of NEW file structure:

    EnSight/verticalChannel.case        # case name
    EnSight/geometry                    # for non-moving geometry

    EnSight/data/                       # time-varying data
    EnSight/data/00000000/
    EnSight/data/00000001/
    ...

  Fields are stored by name within the data/********/ directories:

    EnSight/data/00000001/time          # human-readable time info
    EnSight/data/00000001/U
    EnSight/data/00000001/p
    ...
    EnSight/data/00000001/geometry      # for moving geometry

  Clouds are stored at the next sub-directory level:

    EnSight/data/00000001/lagrangian/<cloudName>/positions
    EnSight/data/00000001/lagrangian/<cloudName>/U
    ...

==================================================
The old structure was significantly more cluttered:

    EnSight/verticalChannel.case
    EnSight/verticalChannel.0000.mesh
    EnSight/verticalChannel.0001.p
    EnSight/verticalChannel.0001.<cloudName>
    EnSight/verticalChannel.0001.<cloudName>.U

==================================================
2016-09-13 18:26:00 +02:00
2bbbcf60de COMP: CGAL rules should use lib64/ (fixes #234)
- 64-bit builds of gcc/mpfr/gmp use lib64/ for their installation path.
  Use this for the wmake rules as well.
2016-09-13 08:58:00 +02:00
a32c043944 BUG: metisDecomp compile failure for WM_DP (closes #232)
- spurious use of floatScalar instead of scalar for processor weights.

STYLE: partially updated dummy metis.h to reflect metis-5.1.0 API
2016-09-13 08:51:03 +02:00
0e5054c3c7 STYLE: PrimitivePatch: undefined function 2016-09-07 12:40:35 +01:00
b74cf47bc3 ENH: snappyHexMesh: combine previous zone based algorithm with v3+ one.
Fixes #66.
2016-09-07 12:38:59 +01:00
0d9fc569c5 BUG: Non-const dereferencing of tmp in fvc:dt2dt2 (closes #227) 2016-09-07 09:33:26 +02:00
7110aa8236 STYLE: propogate WM_CC for CMake (fixes #226)
- reported by Bruno
2016-09-06 16:17:20 +02:00
b5231f2ec1 BUG: triSurface IO operators are asymmetrical (fixed #225)
- Also reported as http://bugs.openfoam.org/view.php?id=2188
2016-09-06 14:57:40 +02:00
fa2ae8e7b4 ENH: add stream operators for MeshedSurface, UnsortedMeshedSurface
- add corrsponding testing into surfaceMeshConvertTesting too
2016-09-06 14:45:44 +02:00
86c214de81 ENH: minor adjustments to surfZoneIdentifier
- gearing to make it more reusable in triSurface
2016-08-12 10:05:01 +02:00
71e1f300c8 ENH: surfaceCheck: survive triangles with duplicate vertices. Fixes #222 2016-08-31 16:47:36 +01:00
4e1ce0241a ENH: snappyHexMesh: added -region option (fixes #223) 2016-08-31 09:44:34 +01:00
ef4ae3063b BUG: snappyHexMesh: patch intersections of mesh was using cell zone information.
This was going wrong in a fair few cases where you would get regions which
were delimited by a combination of intersections with unnamed surfaces (wall)
and named surfaces (faceZone surface) but not with either of these sets
individually. This would cause there to be unvisited cells (zone = -2)
next to a visited cells but separated by a named surface only (and not an
unnamed surface). Fixed by using direct surface intersection in the removal
part. Related to #66.
2016-08-19 10:48:35 +01:00
d716c59f57 COMP: foamDebugSwitches: support for missing randomProcesses. Fixes #213. 2016-08-19 10:46:53 +01:00
b12b50548b BUG: singleCellMesh: writes constant mesh to 0 directory instead.
Fixes partially #93.
2016-08-10 15:49:09 +01:00
8524c72854 CONFIG: allow static or dynamic linkage for optional conversion utility 2016-08-08 11:58:52 +02:00
ce1abf5b42 CONFIG: use src/conversion/Allwmake when building source
- existed, but was not being called
2016-08-08 11:38:38 +02:00
ea1c9a1559 For issue #202, re-adjust commit 08412ddfd3f to use zero-gradient instead
- consistent with approach used elsewhere. Generates smaller files.
2016-08-02 21:56:40 +02:00
feed30d63c BUG: runParallel ignores presence of log file (closes #203)
- was a small typo
2016-08-02 18:31:50 +02:00
9e766b8bc5 ENH: decomposePar -cellDist misses patches (issue #202)
- Propagate cellDist information from internal to patch fields too

NOTE: uses C++11 'auto' and a range-based for loop
2016-08-02 16:39:20 +02:00
616cb0f137 BUG: 'processor' in directory name causes issues (issue #199)
- previously just detected the presence of "processor" in the case
  path name. Restrict to checking the final portion.
  Does not solve all problems, but solves ones like this:

      test-new-processor-generation/....
2016-08-01 14:11:05 +02:00
ed2017aa21 ENH: group info about particle output with "{}" etc
- The only reasonable means of mirroring the data layout.

  The '{}' delimiters mark the extent of the binary writes.

  The primitives 'label' and 'scalar' are directly supported and correspond
  to known byte widths.

  Using "List<scalar>" was a bad choice, since this triggers unpleasant
  tokenizing behaviour. Instead use 'scalars' as a provisional placeholder
  to indicates a list of scalar values. However, there is currently no
  support for actually handling lists of scalars, for several reasons:

   * The information is not available at compile-time.
     The cloud or parcel must be queried. And it must be guaranteed
     that this value is consistent for the entire cloud.

   * Binary output of lists is currently not great for determining the
     the encoded width:
        - A zero-size list is a single '0'.
        - The leading size is a non-constant number of digits.
        - There are prefix/suffix newlines need to be tagged and
          skipped.

  The special '*' (glob) token indicates that the remaining content
  has a dynamic variable length and nothing reasonable can be known
  about their sizes. This is exemplified by the collision records.
2016-06-02 17:39:19 +02:00
215f9a8555 BUG: incorrect face order/orientation in boundBox (issue #196)
- was fortunately not used anywhere previously
2016-07-28 07:00:33 +02:00
e219399d93 ENH: sampledSets: warn for no fields (fixes #206) 2016-08-10 13:32:47 +01:00
d6e15499b8 BUG: snappyHexMesh: compacting list w/o checking for aliasing. Fixes #197 2016-07-27 13:06:01 +01:00
267409dc62 ENH: Changing radiation correct in YEEq.H in fireFoam.
Adding clone member functions to motion solvers
2016-10-26 11:45:57 -07:00
7241e7ddd0 ENH: Adding autoMap and rMap tp greyDiffusiveViewFactorFixedValueFvPatchScalarField 2016-09-30 11:03:10 -07:00
571fc94077 BUG: runTimePostProcessing - corrected surface visualisation caused by regression update/bug 2016-09-07 10:02:02 +01:00
2b40688ebd ENH: Adding iso-plane histogram to regionSizeDistribution 2016-09-02 12:28:20 -07:00
b548540589 BUG: buoyantPimpleFoam - div term should be present for both compressible and incompressible 2016-09-02 08:14:10 +01:00
3fbd69b9e7 Adding area weighted average to U mean calculation for uniformJump option in fan BC 2016-09-02 11:51:59 -07:00
633c0fcc37 STYLE: Corrected spelling error 2016-08-25 17:28:50 +01:00
0e13a0462f BUG: Corrected Doxygen style sheet - patch contributed by Bruno Santos. Fixes #217 2016-08-25 13:36:43 +01:00
57e36b5252 BUG: incompressible/icoFoam/cavityMappingTest - renamed Allrun-serial->Allrun. Fixes #220 2016-08-25 13:34:17 +01:00
ec478c9636 BUG: mesh/filter case - corrected Allrun script. Fixes #219 2016-08-25 13:32:45 +01:00
4302ddf47e BUG: ensightSurfaceReader - enabled reading of data from sub-directory and updated field mask (See #215) 2016-08-18 15:29:56 +01:00
28c15a6ec1 ENH: noise functionality robustness improvements 2016-08-18 15:24:13 +01:00
42325c9cf1 BUG: Corrected FFTW_ARCH_PATH - patch contributed by Bruno Santos. Fixes #210 2016-08-18 11:22:25 +01:00
b34b7fab82 ENH: tetOverlapVolume - improved robustness. Fixes #207 2016-08-11 12:14:43 +01:00
8af962c7b2 ENH: plane - updated construct from components to optionally normalise the normal vector 2016-08-11 12:14:34 +01:00
03f552aa6e BUG: blendingFactor function object updated to handle bounded schemes. Fixes #205 2016-08-09 15:38:40 +01:00
a985c5520b ENH: boundedConvection scheme - added access function to the underlying scheme 2016-08-09 15:33:46 +01:00
93119a478a BUG: maxDeltaxyz LES delta - updated calculation. Fixes #200 2016-08-01 12:59:24 +01:00
d57867da1d STYLE: fanFvPatchField - updated example usage to reflect change in CSV specification. Fixes #177 2016-07-27 13:06:22 +01:00
5ad923bf50 STYLE: externalCoupledFunctionObject: typo 2016-07-27 10:38:58 +01:00
4076d9c9d4 ENH: distinguish OpenFOAM version for user-coding (fixes #195)
The pre-processor macro 'OPENFOAM_PLUS' is defined with a numerical
value equal to the currently compatible version number.

This can be used judiciously within user coding to help with minor
differences between OpenFOAM versions. For example,

    #ifdef OPENFOAM_PLUS
        #if (OPENFOAM_PLUS >= 1612)
        ...
        #endif
    #endif

or simply

    #if (OPENFOAM_PLUS >= 1612)
    ...
    #endif
2016-07-26 14:02:40 +02:00
9b848b64e0 ENH: provide a vfork/exec version of system (issue #185)
The normal library system() command uses 'fork', which causes
problems on IB+OPENMPI.

STYLE: add Foam:: qualifier to system calls to make them easier to spot.
2016-07-18 13:37:39 +02:00
7a3f0f3feb ENH: adapter for a list of C++ strings <-> a list of C-style strings
- Translate a list of C++ strings into C-style (argc, argv) pair.
- Translate C-style (argc, argv) pair to list of C++ strings.

Useful when interfacing to external C-code and some libraries
2016-06-16 08:22:53 +02:00
3772e2ea44 ENH: OSspecific - softlink handling (fixes #164)
Links are followed in most cases, with some notable exceptions:

- mv, mvBak:
  renames the link, not the underlying file/directory

- rmDir:
  remove the symlink to a directory, does not recurse into the
  underlying directory
2014-04-23 15:00:00 +02:00
0c1962ca06 ENH: regIOobject: use reverse order scatter for dictionary
Fixes #192
2016-07-25 14:14:05 +01:00
9317ca55dc STYLE: codedBase: indentation 2016-07-18 15:18:40 +01:00
9b052de408 STYLE: missing include in codeStream test dictionary 2016-07-15 09:05:44 +02:00
e340c86b62 STYLE/ENH: reduce code duplication for coded boundary conditions (issue #184)
- relocate common dictionary output into codedBase class
2016-06-09 16:13:04 +01:00
8f2a40a960 ENH: provide access to the underlying patch types of generic patches (issue #188) 2016-07-15 16:24:46 +02:00
0c28b34833 BUG: polyMesh::movePoints: clear cellTree since gets constructed using current geometry
so will be out of date (w.r.t bounding box, subdivisions) when the mesh moves.
Only when all cells stays in all the same boxes can you skip rebuilding it
so this was not deemed worthwhile. Fixes #172
2016-07-18 16:07:15 +01:00
2df891993c ENH: avoid deprecated resource xml when building paraview plugins (fixes #181)
- remove old VTK_CONVEX_POINT_SET code, since VTK_POLYHEDRON exists
  since several years

ENH: improve robustness of paraFoam script

- only check the relevant plugin types,
  fallback to native reader if needed/possible.
2016-07-12 11:17:57 +02:00
daf86f8b7d CONFIG: remove engridFoam start script
- no engrid development since 2013
2016-07-12 08:19:54 +02:00
211754795b BUG: incorrect wmakePrintBuild -check behaviour when outside of git (issue #174)
- return 0 if not under git, since nothing particular can be said
  about the build number.

- explicitly define which git-dir is to be used.
  This ensure we don't accidentally get some values from some unrelated
  project in the parent directory.
2016-07-12 17:37:30 +02:00
3aa32c4830 STYLE: documentation typo in EulerCoordinateRotation, add external reference 2016-07-06 11:47:10 +02:00
803871ae48 STYLE: mention suppression of banner for surfaceMeshInfo, ... (issue #125) 2016-07-06 07:43:05 +02:00
ecbe31d210 BUG: config.csh: wrong variable. Fixes #176 2016-07-06 09:23:55 +01:00
3637024d45 BUG: Turbulence DFSEM - protect sigFpe for reconstruct - see #194 2016-07-26 15:33:10 +01:00
a17c282104 BUG: mapFields function object - evaluate constraint patches after mapping. Fixes #190 2016-07-26 12:05:15 +01:00
b062ca29e7 BUG: runTimePostProcessing - correct the glyph behaviour when dealing with cell data. Fixes #186 2016-07-22 15:32:17 +01:00
18842a7069 ENH: Adding optional uniform jump switch to fan BC 2016-07-27 08:55:52 -07:00
acd51c8d7e COMP: fftw needs int (not long) for its dimensionality (issue #175)
- explicitly use List<int> instead List<label> for API compatibility,
  even when 64-bit labels are in use.
2016-07-07 11:20:28 +02:00
758900bf39 COMP: template ambiguity for 64-bit labels (issue #175) 2016-07-07 11:17:09 +02:00
06aa7205d0 CONFIG: rename config file to avoid premature filtering of its name 2016-07-06 08:11:42 +02:00
8ab25d7d31 CONFIG: use ThirdParty boost, FFTW instead of system versions
- many systems may not have boost or FFTW installed, or in an older
  version. Using ThirdParty for them should lead to a more robust
  build process.
2016-07-05 16:15:03 +02:00
c4511687c4 BUG: randomProcesses/Allwmake not being called (fixes #171) 2016-07-05 14:43:59 +02:00
b2c5e66699 BUG: need 'unset -f' to unset functions (issue #170)
- triggered by dash.
2016-07-01 17:55:03 +02:00
b1a419d576 BUG: Taken out mesh flux from the hEqn for Solid to Gas reactions 2016-07-19 10:51:50 -07:00
e120a7698e ENH: Adding support to moving mesh to activePressureForceBaffle 2016-07-07 10:19:56 -07:00
7741 changed files with 227049 additions and 268531 deletions

5
.gitignore vendored
View File

@ -6,6 +6,8 @@
.*~
*.bak
*.bak[0-9][0-9]
*.orig
*.orig[0-9][0-9]
\#*\#
# File-browser settings - anywhere
@ -75,10 +77,9 @@ doc/Doxygen/DTAGS
# Ignore .tags in the main directory
/.tags
# Ignore project files in the main directory
# Ignore eclipse project files in the main directory
/.cproject
/.project
/.dir-locals.el
# Ignore the test directory
/tutorialsTest

View File

@ -1,7 +1,9 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
# Parse arguments for library compilation
# Parse arguments for library compilation without documentation by default
genDoc=0
targetType=libso
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
wmakeCheckPwd "$WM_PROJECT_DIR" || {
@ -25,25 +27,20 @@ if [ -d "$WM_THIRD_PARTY_DIR" ]
then
$WM_THIRD_PARTY_DIR/Allwmake
else
echo "No ThirdParty directory found - skipping"
echo "Allwmake: no ThirdParty directory found - skipping"
fi
echo "========================================"
echo "Compile OpenFOAM libraries"
echo
# Compile OpenFOAM libraries and applications
src/Allwmake $targetType $*
echo "========================================"
echo "Compile OpenFOAM applications"
echo
# Compile OpenFOAM libraries and applications
applications/Allwmake $targetType $*
# Some summary information
echo
date "+%Y-%m-%d %H:%M:%S %z" 2>/dev/null || echo "date is unknown"
echo "========================================"
echo " ${WM_PROJECT_DIR##*/}"
echo " $WM_COMPILER $WM_COMPILER_TYPE compiler"
echo " ${WM_OPTIONS}, with ${WM_MPLIB} ${FOAM_MPI}"
echo
# Optionally build OpenFOAM Doxygen documentation
if [ $genDoc -eq 1 ]
then
doc/Allwmake
fi
#------------------------------------------------------------------------------

View File

@ -1,63 +0,0 @@
OpenFOAM-v1612+
==================
Known Build Issues
==================
--------------
Intel Compiler
--------------
Since OpenFOAM uses C++11, a fairly recent version is required.
The Intel compiler - icc (ICC) 17.0.1 20161005 is ok, but the
initial release - icc (ICC) 17.0.0 20160721 - has a bug that
will result in these types of error messages.
MatrixSpaceI.H(492): error: no instance of overloaded function
"Foam::MatrixSpace<Form, Cmpt, Mrows, Ncols>::Block<SubTensor,
BRowStart, BColStart>::operator=" matches the specified type
---
VTK
---
If using the runTimePostProcessing to create on-the-fly images, you
can either simply just compile ParaView-5.0.1 and these libraries will
be used.
If you elect to use a separate VTK compilation (for example for
off-screen rendering), it is advisable to reuse the VTK libraries that
are provided with ParaView-5.0.1, by making an appropriate symlink
prior to using makeVTK. This doesn't just reduce disk-space, but works
much better than using the VTK-7.1.0.tar file.
Using runTimePostProcessing with the 'plain' VTK-7.1.0 libraries does
generally work, but does not exit cleanly:
symbol lookup error: .../linux64Gcc/VTK-7.1.0/lib/libvtkCommonExecutionModel-7.1.so.1:
undefined symbol: _ZN33vtkFilteringInformationKeyManager13ClassFinalizeEv
symbol lookup error: .../linux64Gcc/VTK-7.1.0/lib/libvtkCommonDataModel-7.1.so.1:
undefined symbol: _ZN49vtkInformationQuadratureSchemeDefinitionVectorKeyD1Ev
This error appears to be suppressed if VTK is compiled with a Debug build-type.
-------------------------
Building on older systems
-------------------------
If the system gcc is too old for building OpenFOAM, a third-party gcc or
clang/llvm installation can be used. If building clang/llvm, note that
there are also minimum gcc/g++ requirements there:
Min gcc/g++
=========== ==========
4.4 llvm-3.4.2
4.7 llvm-3.5.2 - llvm-3.7.0
If your system compiler is too old to build the minimum required gcc or
clang/llvm, it is just simply too old.
--

View File

@ -1,26 +1,22 @@
# About OpenFOAM
OpenFOAM is a free, open source CFD software [released and developed primarily by OpenCFD Ltd](http://www.openfoam.com) since 2004released and developed primarily by. It has a large user base across most areas of engineering and science, from both commercial and academic organisations. OpenFOAM has an extensive range of features to solve anything from complex fluid flows involving chemical reactions, turbulence and heat transfer, to acoustics, solid mechanics and electromagnetics. [More...](http://www.openfoam.com/documentation)
OpenFOAM is a free, open source CFD software package developed primarily by [OpenCFD](http://www.openfoam.com) since 2004 and is currently distributed by [ESI-OpenCFD](http://www.openfoam.com) and the [OpenFOAM Foundation](http://openfoam.org). It has a large user base across most areas of engineering and science, from both commercial and academic organisations. OpenFOAM has an extensive range of features to solve anything from complex fluid flows involving chemical reactions, turbulence and heat transfer, to acoustics, solid mechanics and electromagnetics. [More...](http://www.openfoam.com/documentation)
OpenFOAM+ is professionally released every six months to include customer sponsored developments and contributions from the community, including the OpenFOAM Foundation. Releases designated OpenFOAM+ contain several man years of client-sponsored developments of which much has been transferred to, but not released in the OpenFOAM Foundation branch.
OpenFOAM+ uses the OpenFOAM Foundation version as a common code base, with wider functionality and platform support. Its purpose is to accelerate the public availability of new features which are sponsored by OpenCFD's customers and contributed by the OpenFOAM community.
# Copyright
OpenFOAM is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. See the file COPYING in this directory or [http://www.gnu.org/licenses/](http://www.gnu.org/licenses), for a description of the GNU General Public License terms under which you can copy the files.
OpenFOAM+ is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. See the file COPYING in this directory or [http://www.gnu.org/licenses/](http://www.gnu.org/licenses/), for a description of the GNU General Public License terms under which you can copy the files.
# OpenFOAM Trademark
OpenCFD Ltd grants use of the OpenFOAM trademark by Third Parties on a licence basis. ESI Group and the OpenFOAM Foundation Ltd are currently permitted to use the trademark. For information on trademark use, please refer to the [trademark policy guidelines](http://www.openfoam.com/legal/trademark-policy.php).
Please [contact OpenCFD](http://www.openfoam.com/contact) if you have any questions on the use of the OpenFOAM trademark.
Violations of the Trademark are continuously monitored, and will be duly prosecuted.
OpenCFD Limited, owner of the OpenFOAM Trademark, has granted the use of the Trademark to the OpenFOAM Foundation. Violations of the Trademark are continuously monitored and will be duly prosecuted. Please [contact OpenCFD](http://www.openfoam.com/contact) if you have any questions on the use of the OpenFOAM trademark.
# Useful Links
- [Download and installation instructions](http://www.openfoam.com/download/)
- [Download and installation instructions](http://www.openfoam.com/releases)
- [Documentation](http://www.openfoam.com/documentation)
- [Reporting bugs/issues/feature requests](http://www.openfoam.com/code/bug-reporting.php)
- [OpenFOAM Community](http://www.openfoam.com/community/)
- [Contacting OpenCFD](http://www.openfoam.com/contact/)
- [Reporting bugs/issues (including bugs/suggestions/feature requests) in OpenFOAM+](http://www.openfoam.com/code/bug-reporting.php)
- [Collaborative and Community-based Developments](http://www.openfoam.com/services/community-projects.php)
- [Contacting OpenCFD](http://www.openfoam.com/contact)
Copyright 2016 OpenCFD Ltd

View File

@ -2,6 +2,7 @@
cd ${0%/*} || exit 1 # Run from this directory
# Parse arguments for library compilation
targetType=libso
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
wmakeCheckPwd "$WM_PROJECT_DIR/applications" || {
@ -17,7 +18,10 @@ wmakeCheckPwd "$WM_PROJECT_DIR/applications" || {
exit 1
}
wmake -all $targetType solvers
wmake -all $targetType utilities
set -x
wmake -all solvers $*
wmake -all utilities $*
#------------------------------------------------------------------------------

View File

@ -6,7 +6,9 @@ if [ -f "$FFTW_ARCH_PATH/include/fftw3.h" ] || \
then
wmake
else
echo "==> skip dnsFoam solver (no FFTW)"
echo
echo "Skipping dnsFoam solver (no FFTW)"
echo
fi
#------------------------------------------------------------------------------

View File

@ -1,5 +1,3 @@
#include "readTransportProperties.H"
Info<< "Reading field p\n" << endl;
volScalarField p
(
@ -31,5 +29,3 @@ volVectorField U
#include "createPhi.H"
mesh.setFluxRequired(p.name());
#include "readTurbulenceProperties.H"

View File

@ -28,7 +28,7 @@ Group
grpDNSSolvers
Description
Direct numerical simulation solver for boxes of isotropic turbulence.
Direct numerical simulation solver for boxes of isotropic turbulence
\*---------------------------------------------------------------------------*/
@ -44,13 +44,16 @@ Description
int main(int argc, char *argv[])
{
#include "postProcess.H"
#include "setRootCase.H"
#include "createTime.H"
#include "createMeshNoClear.H"
#include "createControl.H"
pisoControl piso(mesh);
#include "readTransportProperties.H"
#include "createFields.H"
#include "readTurbulenceProperties.H"
#include "initContinuityErrs.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -61,7 +64,7 @@ int main(int argc, char *argv[])
{
Info<< "Time = " << runTime.timeName() << nl << endl;
force.primitiveFieldRef() = ReImSum
force.internalField() = ReImSum
(
fft::reverseTransform
(
@ -116,7 +119,7 @@ int main(int argc, char *argv[])
runTime.write();
if (runTime.writeTime())
if (runTime.outputTime())
{
calcEk(U, K).write
(

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -52,7 +52,6 @@ Description
\*---------------------------------------------------------------------------*/
#include "fvCFD.H"
#include "fvOptions.H"
#include "simpleControl.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -67,7 +66,6 @@ int main(int argc, char *argv[])
simpleControl simple(mesh);
#include "createFields.H"
#include "createFvOptions.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -79,16 +77,10 @@ int main(int argc, char *argv[])
while (simple.correctNonOrthogonal())
{
fvScalarMatrix TEqn
solve
(
fvm::ddt(T) - fvm::laplacian(DT, T)
==
fvOptions(T)
);
fvOptions.constrain(TEqn);
TEqn.solve();
fvOptions.correct(T);
}
#include "write.H"

View File

@ -1,4 +1,4 @@
if (runTime.writeTime())
if (runTime.outputTime())
{
volVectorField gradT(fvc::grad(T));

View File

@ -1,9 +0,0 @@
const dictionary& potentialFlow
(
mesh.solutionDict().subDict("potentialFlow")
);
const int nNonOrthCorr
(
potentialFlow.lookupOrDefault<int>("nNonOrthogonalCorrectors", 0)
);

View File

@ -43,7 +43,7 @@ word pName("p");
// Update name of the pressure field from the command-line option
args.optionReadIfPresent("pName", pName);
// Infer the pressure BCs from the velocity
// Infer the pressure BCs from the velocity BCs
wordList pBCTypes
(
U.boundaryField().size(),
@ -78,37 +78,63 @@ volScalarField p
pBCTypes
);
// Infer the velocity potential BCs from the pressure
wordList PhiBCTypes
(
p.boundaryField().size(),
zeroGradientFvPatchScalarField::typeName
);
forAll(p.boundaryField(), patchi)
label pRefCell = 0;
scalar pRefValue = 0.0;
if (args.optionFound("writep"))
{
if (p.boundaryField()[patchi].fixesValue())
{
PhiBCTypes[patchi] = fixedValueFvPatchScalarField::typeName;
}
setRefCell
(
p,
potentialFlow.dict(),
pRefCell,
pRefValue
);
}
Info<< "Constructing velocity potential field Phi\n" << endl;
volScalarField Phi
autoPtr<volScalarField> PhiPtr;
IOobject io
(
IOobject
(
"Phi",
runTime.timeName(),
mesh,
IOobject::READ_IF_PRESENT,
IOobject::NO_WRITE
),
"Phi",
runTime.timeName(),
mesh,
dimensionedScalar("Phi", dimLength*dimVelocity, 0),
PhiBCTypes
IOobject::MUST_READ,
IOobject::NO_WRITE
);
if (io.typeHeaderOk<volScalarField>())
{
PhiPtr.reset(new volScalarField(io, mesh));
}
else
{
// Cannot just use p.boundaryField().types() since does not initialise
// complex boundary types. Instead re-clone them from p.
io.readOpt() = IOobject::NO_READ;
PhiPtr.reset
(
new volScalarField
(
io,
mesh,
dimensionedScalar("Phi", dimLength*dimVelocity, 0),
p.boundaryField().types()
)
);
const volScalarField::GeometricBoundaryField& bp = p.boundaryField();
volScalarField::GeometricBoundaryField& bPhi = PhiPtr().boundaryField();
forAll(bp, patchI)
{
bPhi.set(patchI, bp[patchI].clone(PhiPtr().dimensionedInternalField()));
}
}
volScalarField& Phi = PhiPtr();
label PhiRefCell = 0;
scalar PhiRefValue = 0;
setRefCell
@ -119,5 +145,3 @@ setRefCell
PhiRefValue
);
mesh.setFluxRequired(Phi.name());
#include "createMRF.H"

View File

@ -28,9 +28,7 @@ Group
grpBasicSolvers
Description
Potential flow solver which solves for the velocity potential, to
calculate the flux-field, from which the velocity field is obtained by
reconstructing the flux.
Potential flow solver.
\heading Solver details
The potential flow solution is typically employed to generate initial fields
@ -132,6 +130,7 @@ int main(int argc, char *argv[])
pisoControl potentialFlow(mesh, "potentialFlow");
#include "createFields.H"
#include "createMRF.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -87,16 +87,17 @@ Description
int main(int argc, char *argv[])
{
#include "postProcess.H"
#include "setRootCase.H"
#include "createTime.H"
#include "createMesh.H"
#include "createControl.H"
pimpleControl pimple(mesh);
#include "readCombustionProperties.H"
#include "readGravitationalAcceleration.H"
#include "createFields.H"
#include "createFieldRefs.H"
#include "createMRF.H"
#include "createFvOptions.H"
#include "initContinuityErrs.H"
#include "createTimeControls.H"
@ -112,7 +113,7 @@ int main(int argc, char *argv[])
while (runTime.run())
{
#include "readTimeControls.H"
#include "createTimeControls.H"
#include "compressibleCourantNo.H"
#include "setDeltaT.H"

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -98,7 +98,7 @@ int main(int argc, char *argv[])
while (runTime.run())
{
#include "readTimeControls.H"
#include "createTimeControls.H"
#include "compressibleCourantNo.H"
#include "setDeltaT.H"
@ -131,11 +131,11 @@ int main(int argc, char *argv[])
protectedCell = 0;
}
forAll(betav, celli)
forAll(betav, cellI)
{
if (betav[celli] < 0.99)
if (betav[cellI] < 0.99)
{
protectedCell[celli] = 1;
protectedCell[cellI] = 1;
}
}

View File

@ -105,7 +105,7 @@ Foam::tmp<Foam::volScalarField> Foam::XiEqModels::basicSubGrid::XiEq() const
mesh,
dimensionedScalar("zero", Nv.dimensions(), 0.0)
);
N.primitiveFieldRef() = Nv.primitiveField()*Cw;
N.internalField() = Nv.internalField()*Cw;
volSymmTensorField ns
(
@ -125,7 +125,7 @@ Foam::tmp<Foam::volScalarField> Foam::XiEqModels::basicSubGrid::XiEq() const
Zero
)
);
ns.primitiveFieldRef() = nsv.primitiveField()*Cw;
ns.internalField() = nsv.internalField()*Cw;
volScalarField n(max(N - (Uhat & ns & Uhat), scalar(1e-4)));
volScalarField b((Uhat & B_ & Uhat)/sqrt(n));

View File

@ -73,7 +73,7 @@ Foam::tmp<Foam::volScalarField> Foam::XiGModels::basicSubGrid::G() const
volScalarField& Gtot = tGtot.ref();
const scalarField Cw = pow(Su_.mesh().V(), 2.0/3.0);
scalarField N(Nv.primitiveField()*Cw);
scalarField N(Nv.internalField()*Cw);
forAll(N, celli)
{

View File

@ -130,7 +130,7 @@ void PDRkEpsilon::correct()
tgradU.clear();
// Update espsilon and G at the wall
epsilon_.boundaryFieldRef().updateCoeffs();
epsilon_.boundaryField().updateCoeffs();
// Add the blockage generation term so that it is included consistently
// in both the k and epsilon equations
@ -163,7 +163,7 @@ void PDRkEpsilon::correct()
epsEqn.ref().relax();
epsEqn.ref().boundaryManipulate(epsilon_.boundaryFieldRef());
epsEqn.ref().boundaryManipulate(epsilon_.boundaryField());
solve(epsEqn);
bound(epsilon_, epsilonMin_);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -36,8 +36,8 @@ Description
{
scalarField sumPhi
(
fvc::surfaceSum(mag(phiSt))().primitiveField()
/ rho.primitiveField()
fvc::surfaceSum(mag(phiSt))().internalField()
/ rho.internalField()
);
StCoNum = 0.5*gMax(sumPhi/mesh.V().field())*runTime.deltaTValue();

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -74,7 +74,7 @@ Foam::tmp<Foam::volScalarField> Foam::XiEqModels::Gulder::XiEq() const
if (subGridSchelkin_)
{
up.primitiveFieldRef() += calculateSchelkinEffect(uPrimeCoef_);
up.internalField() += calculateSchelkinEffect(uPrimeCoef_);
}
volScalarField tauEta(sqrt(mag(thermo_.muu()/(thermo_.rhou()*epsilon))));

View File

@ -82,7 +82,7 @@ Foam::tmp<Foam::volScalarField> Foam::XiEqModels::SCOPEXiEq::XiEq() const
volScalarField up(sqrt((2.0/3.0)*k));
if (subGridSchelkin_)
{
up.primitiveFieldRef() += calculateSchelkinEffect(uPrimeCoef_);
up.internalField() += calculateSchelkinEffect(uPrimeCoef_);
}
volScalarField l(lCoef_*sqrt(3.0/2.0)*up*k/epsilon);
@ -119,11 +119,9 @@ Foam::tmp<Foam::volScalarField> Foam::XiEqModels::SCOPEXiEq::XiEq() const
}
}
volScalarField::Boundary& xieqBf = xieq.boundaryFieldRef();
forAll(xieq.boundaryField(), patchi)
{
scalarField& xieqp = xieqBf[patchi];
scalarField& xieqp = xieq.boundaryField()[patchi];
const scalarField& Kp = K.boundaryField()[patchi];
const scalarField& Map = Ma.boundaryField()[patchi];
const scalarField& upBySup = upBySu.boundaryField()[patchi];

View File

@ -114,7 +114,7 @@ Foam::XiEqModel::calculateSchelkinEffect(const scalar uPrimeCoef) const
)
);
volScalarField& N = tN.ref();
N.primitiveFieldRef() = Nv.primitiveField()*pow(mesh.V(), 2.0/3.0);
N.internalField() = Nv.internalField()*pow(mesh.V(), 2.0/3.0);
volSymmTensorField ns
(
@ -134,7 +134,7 @@ Foam::XiEqModel::calculateSchelkinEffect(const scalar uPrimeCoef) const
Zero
)
);
ns.primitiveFieldRef() = nsv.primitiveField()*pow(mesh.V(), 2.0/3.0);
ns.internalField() = nsv.internalField()*pow(mesh.V(), 2.0/3.0);
const volVectorField Uhat
(
@ -150,7 +150,7 @@ Foam::XiEqModel::calculateSchelkinEffect(const scalar uPrimeCoef) const
const scalarField deltaUp(upLocal*(max(scalar(1.0), pow(nr, 0.5)) - 1.0));
// Re use tN
N.primitiveFieldRef() = upLocal*(max(scalar(1.0), pow(nr, 0.5)) - 1.0);
N.internalField() = upLocal*(max(scalar(1.0), pow(nr, 0.5)) - 1.0);
return tN;
}

View File

@ -1 +0,0 @@
const volScalarField& psi = thermo.psi();

View File

@ -23,6 +23,7 @@ volScalarField rho
);
volScalarField& p = thermo.p();
const volScalarField& psi = thermo.psi();
volScalarField& b = composition.Y("b");
Info<< "min(b) = " << min(b).value() << endl;
@ -226,5 +227,3 @@ fields.add(b);
fields.add(thermo.he());
fields.add(thermo.heu());
flameWrinkling->addXi(fields);
#include "createMRF.H"

View File

@ -266,11 +266,9 @@ Foam::tmp<Foam::volScalarField> Foam::laminarFlameSpeedModels::SCOPE::Su0pTphi
Su0[celli] = Su0pTphi(p[celli], Tu[celli], phi);
}
volScalarField::Boundary& Su0Bf = Su0.boundaryFieldRef();
forAll(Su0Bf, patchi)
forAll(Su0.boundaryField(), patchi)
{
scalarField& Su0p = Su0Bf[patchi];
scalarField& Su0p = Su0.boundaryField()[patchi];
const scalarField& pp = p.boundaryField()[patchi];
const scalarField& Tup = Tu.boundaryField()[patchi];
@ -315,11 +313,9 @@ Foam::tmp<Foam::volScalarField> Foam::laminarFlameSpeedModels::SCOPE::Su0pTphi
Su0[celli] = Su0pTphi(p[celli], Tu[celli], phi[celli]);
}
volScalarField::Boundary& Su0Bf = Su0.boundaryFieldRef();
forAll(Su0Bf, patchi)
forAll(Su0.boundaryField(), patchi)
{
scalarField& Su0p = Su0Bf[patchi];
scalarField& Su0p = Su0.boundaryField()[patchi];
const scalarField& pp = p.boundaryField()[patchi];
const scalarField& Tup = Tu.boundaryField()[patchi];
const scalarField& phip = phi.boundaryField()[patchi];
@ -369,11 +365,9 @@ Foam::tmp<Foam::volScalarField> Foam::laminarFlameSpeedModels::SCOPE::Ma
ma[celli] = Ma(phi[celli]);
}
volScalarField::Boundary& maBf = ma.boundaryFieldRef();
forAll(maBf, patchi)
forAll(ma.boundaryField(), patchi)
{
scalarField& map = maBf[patchi];
scalarField& map = ma.boundaryField()[patchi];
const scalarField& phip = phi.boundaryField()[patchi];
forAll(map, facei)

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015-2016 OpenCFD Ltd.
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -67,26 +67,25 @@ Description
int main(int argc, char *argv[])
{
#include "postProcess.H"
#include "setRootCase.H"
#include "createTime.H"
#include "createDynamicFvMesh.H"
#include "createControl.H"
#include "initContinuityErrs.H"
pimpleControl pimple(mesh);
#include "readCombustionProperties.H"
#include "readGravitationalAcceleration.H"
#include "createFields.H"
#include "createFieldRefs.H"
#include "createMRF.H"
#include "createFvOptions.H"
#include "initContinuityErrs.H"
#include "createRhoUf.H"
#include "createControls.H"
#include "initContinuityErrs.H"
#include "compressibleCourantNo.H"
#include "setInitialDeltaT.H"
turbulence->validate();
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info<< "\nStarting time loop\n" << endl;

View File

@ -1,6 +1,7 @@
#include "readTimeControls.H"
#include "readTimeControls.H"
correctPhi = pimple.dict().lookupOrDefault<Switch>("correctPhi", true);
bool correctPhi =
pimple.dict().lookupOrDefault<Switch>("correctPhi", true);
checkMeshCourantNo =
pimple.dict().lookupOrDefault<Switch>("checkMeshCourantNo", false);
bool checkMeshCourantNo =
pimple.dict().lookupOrDefault<Switch>("checkMeshCourantNo", false);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -65,15 +65,16 @@ Description
int main(int argc, char *argv[])
{
#include "postProcess.H"
#include "setRootCase.H"
#include "createTime.H"
#include "createMesh.H"
#include "createControl.H"
pimpleControl pimple(mesh);
#include "readCombustionProperties.H"
#include "createFields.H"
#include "createFieldRefs.H"
#include "createMRF.H"
#include "createFvOptions.H"
#include "initContinuityErrs.H"
#include "createTimeControls.H"
@ -88,7 +89,7 @@ int main(int argc, char *argv[])
while (runTime.run())
{
#include "readTimeControls.H"
#include "createTimeControls.H"
#include "compressibleCourantNo.H"
#include "setDeltaT.H"

View File

@ -1 +0,0 @@
const volScalarField& psi = thermo.psi();

View File

@ -23,6 +23,7 @@ volScalarField rho
);
volScalarField& p = thermo.p();
const volScalarField& psi = thermo.psi();
volScalarField& b = composition.Y("b");
Info<< "min(b) = " << min(b).value() << endl;
@ -138,5 +139,3 @@ if (composition.contains("ft"))
fields.add(b);
fields.add(thermo.he());
fields.add(thermo.heu());
#include "createMRF.H"

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -28,10 +28,12 @@ Group
grpCombustionSolvers
Description
Solver for chemistry problems, designed for use on single cell cases to
provide comparison against other chemistry solvers, that uses a single cell
mesh, and fields created from the initial conditions.
Solver for chemistry problems designed for use on single cell cases to
provide comparison against other chemistry solvers
Note:
- single cell mesh created on-the-fly
- fields created on the fly from the initial conditions
\*---------------------------------------------------------------------------*/
@ -50,15 +52,10 @@ int main(int argc, char *argv[])
{
argList::noParallel();
#define CREATE_MESH createSingleCellMesh.H
#define NO_CONTROL
#include "postProcess.H"
#include "setRootCase.H"
#include "createTime.H"
#include "createSingleCellMesh.H"
#include "createFields.H"
#include "createFieldRefs.H"
#include "readInitialConditions.H"
#include "createControls.H"

View File

@ -1,4 +0,0 @@
scalar dtChem = refCast<const psiChemistryModel>(chemistry).deltaTChem()[0];
basicMultiComponentMixture& composition = thermo.composition();
PtrList<volScalarField>& Y = composition.Y();
volScalarField& p = thermo.p();

View File

@ -12,7 +12,7 @@
(
"initialConditions",
runTime.constant(),
mesh,
runTime,
IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE
)
@ -27,30 +27,36 @@
autoPtr<psiChemistryModel> pChemistry(psiChemistryModel::New(mesh));
psiChemistryModel& chemistry = pChemistry();
scalar dtChem = refCast<const psiChemistryModel>(chemistry).deltaTChem()[0];
psiReactionThermo& thermo = chemistry.thermo();
thermo.validate(args.executable(), "h");
basicMultiComponentMixture& composition = thermo.composition();
PtrList<volScalarField>& Y = composition.Y();
volScalarField rho
(
IOobject
(
"rho",
runTime.timeName(),
mesh,
runTime,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
thermo.rho()
);
volScalarField& p = thermo.p();
volScalarField Rspecific
(
IOobject
(
"Rspecific",
runTime.timeName(),
mesh,
runTime,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
@ -69,7 +75,7 @@
(
"U",
runTime.timeName(),
mesh,
runTime,
IOobject::NO_READ,
IOobject::NO_WRITE
),

View File

@ -1,5 +1,4 @@
EXE_INC = \
-I. \
-I../engineFoam \
-I../XiFoam \
-I../../compressible/rhoPimpleFoam \

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -45,16 +45,15 @@ Description
int main(int argc, char *argv[])
{
#define CREATE_TIME createEngineTime.H
#define CREATE_MESH createEngineMesh.H
#include "postProcess.H"
#include "setRootCase.H"
#include "createEngineTime.H"
#include "createEngineMesh.H"
#include "createControl.H"
pimpleControl pimple(mesh);
#include "createFields.H"
#include "createFieldRefs.H"
#include "createMRF.H"
#include "createFvOptions.H"
#include "createRhoUf.H"
#include "initContinuityErrs.H"

View File

@ -1,2 +0,0 @@
const volScalarField& psi = thermo.psi();
const volScalarField& T = thermo.T();

View File

@ -1,70 +1,71 @@
Info<< "Reading thermophysical properties\n" << endl;
Info<< "Reading thermophysical properties\n" << endl;
autoPtr<psiThermo> pThermo
(
psiThermo::New(mesh)
);
psiThermo& thermo = pThermo();
thermo.validate(args.executable(), "h", "e");
volScalarField rho
(
IOobject
autoPtr<psiThermo> pThermo
(
"rho",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
thermo.rho()
);
psiThermo::New(mesh)
);
psiThermo& thermo = pThermo();
thermo.validate(args.executable(), "h", "e");
volScalarField& p = thermo.p();
Info<< "\nReading field U\n" << endl;
volVectorField U
(
IOobject
volScalarField rho
(
"U",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
IOobject
(
"rho",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
thermo.rho()
);
#include "compressibleCreatePhi.H"
volScalarField& p = thermo.p();
const volScalarField& psi = thermo.psi();
const volScalarField& T = thermo.T();
Info<< "Creating turbulence model\n" << endl;
autoPtr<compressible::turbulenceModel> turbulence
(
compressible::turbulenceModel::New
Info<< "\nReading field U\n" << endl;
volVectorField U
(
rho,
U,
phi,
thermo
)
);
Info<< "Creating field dpdt\n" << endl;
volScalarField dpdt
(
IOobject
(
"dpdt",
runTime.timeName(),
IOobject
(
"U",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
),
mesh,
dimensionedScalar("dpdt", p.dimensions()/dimTime, 0)
);
);
Info<< "Creating field kinetic energy K\n" << endl;
volScalarField K("K", 0.5*magSqr(U));
#include "compressibleCreatePhi.H"
#include "createMRF.H"
Info<< "Creating turbulence model\n" << endl;
autoPtr<compressible::turbulenceModel> turbulence
(
compressible::turbulenceModel::New
(
rho,
U,
phi,
thermo
)
);
Info<< "Creating field dpdt\n" << endl;
volScalarField dpdt
(
IOobject
(
"dpdt",
runTime.timeName(),
mesh
),
mesh,
dimensionedScalar("dpdt", p.dimensions()/dimTime, 0)
);
Info<< "Creating field kinetic energy K\n" << endl;
volScalarField K("K", 0.5*magSqr(U));

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -68,17 +68,16 @@ Description
int main(int argc, char *argv[])
{
#define CREATE_TIME createEngineTime.H
#define CREATE_MESH createEngineMesh.H
#include "postProcess.H"
#include "setRootCase.H"
#include "createEngineTime.H"
#include "createEngineMesh.H"
#include "createControl.H"
pimpleControl pimple(mesh);
#include "readCombustionProperties.H"
#include "createFields.H"
#include "createFieldRefs.H"
#include "createMRF.H"
#include "createFvOptions.H"
#include "createRhoUf.H"
#include "initContinuityErrs.H"

View File

@ -21,6 +21,7 @@ EXE_INC = \
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \
-I$(LIB_SRC)/combustionModels/lnInclude \
-I$(LIB_SRC)/regionModels/regionModel/lnInclude \
-I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \
-I$(LIB_SRC)/regionModels/pyrolysisModels/lnInclude \
@ -28,6 +29,7 @@ EXE_INC = \
-I$(LIB_SRC)/lagrangian/intermediate/lnInclude \
-I$(LIB_SRC)/ODE/lnInclude
EXE_LIBS = \
-lfiniteVolume \
-lfvOptions \

View File

@ -9,13 +9,15 @@ tmp<fv::convectionScheme<scalar>> mvConvection
)
);
{
radiation->correct();
combustion->correct();
dQ = combustion->dQ();
label inertIndex = -1;
volScalarField Yt(0.0*Y[0]);
forAll(Y, i)
{
if (i != inertIndex && composition.active(i))
if (Y[i].name() != inertSpecie)
{
volScalarField& Yi = Y[i];
@ -42,6 +44,10 @@ tmp<fv::convectionScheme<scalar>> mvConvection
Yi.max(0.0);
Yt += Yi;
}
else
{
inertIndex = i;
}
}
Y[inertIndex] = scalar(1) - Yt;

View File

@ -1,4 +0,0 @@
const volScalarField& psi = thermo.psi();
const volScalarField& T = thermo.T();
filmModelType& surfaceFilm = tsurfaceFilm();
const label inertIndex(composition.species()[inertSpecie]);

View File

@ -19,13 +19,6 @@ basicMultiComponentMixture& composition = thermo.composition();
PtrList<volScalarField>& Y = composition.Y();
const word inertSpecie(thermo.lookup("inertSpecie"));
if (!composition.species().found(inertSpecie))
{
FatalIOErrorIn(args.executable().c_str(), thermo)
<< "Inert specie " << inertSpecie << " not found in available species "
<< composition.species()
<< exit(FatalIOError);
}
Info<< "Creating field rho\n" << endl;
volScalarField rho
@ -42,6 +35,8 @@ volScalarField rho
);
volScalarField& p = thermo.p();
const volScalarField& T = thermo.T();
const volScalarField& psi = thermo.psi();
Info<< "\nReading field U\n" << endl;
volVectorField U
@ -59,9 +54,6 @@ volVectorField U
#include "compressibleCreatePhi.H"
#include "createMRF.H"
Info<< "Creating turbulence model\n" << endl;
autoPtr<compressible::turbulenceModel> turbulence
(
@ -77,60 +69,6 @@ autoPtr<compressible::turbulenceModel> turbulence
// Set the turbulence into the combustion model
combustion->setTurbulence(turbulence());
#include "readGravitationalAcceleration.H"
#include "readhRef.H"
#include "gh.H"
#include "readpRef.H"
volScalarField p_rgh
(
IOobject
(
"p_rgh",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
mesh.setFluxRequired(p_rgh.name());
#include "phrghEqn.H"
multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
forAll(Y, i)
{
fields.add(Y[i]);
}
fields.add(thermo.he());
IOdictionary additionalControlsDict
(
IOobject
(
"additionalControls",
runTime.constant(),
mesh,
IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE
)
);
Switch solvePrimaryRegion
(
additionalControlsDict.lookup("solvePrimaryRegion")
);
Switch solvePyrolysisRegion
(
additionalControlsDict.lookupOrDefault<bool>("solvePyrolysisRegion", true)
);
volScalarField dQ
(
IOobject
@ -162,7 +100,51 @@ volScalarField dpdt
Info<< "Creating field kinetic energy K\n" << endl;
volScalarField K("K", 0.5*magSqr(U));
#include "createClouds.H"
#include "createSurfaceFilmModel.H"
#include "createPyrolysisModel.H"
#include "createRadiationModel.H"
#include "readGravitationalAcceleration.H"
#include "readhRef.H"
#include "gh.H"
volScalarField p_rgh
(
IOobject
(
"p_rgh",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
// Force p_rgh to be consistent with p
p_rgh = p - rho*gh;
mesh.setFluxRequired(p_rgh.name());
multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
forAll(Y, i)
{
fields.add(Y[i]);
}
fields.add(thermo.he());
IOdictionary additionalControlsDict
(
IOobject
(
"additionalControls",
runTime.constant(),
mesh,
IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE
)
);
Switch solvePrimaryRegion
(
additionalControlsDict.lookup("solvePrimaryRegion")
);

View File

@ -3,3 +3,4 @@ Info<< "\nConstructing surface film model" << endl;
typedef regionModels::surfaceFilmModels::surfaceFilmModel filmModelType;
autoPtr<filmModelType> tsurfaceFilm(filmModelType::New(mesh, g));
filmModelType& surfaceFilm = tsurfaceFilm();

View File

@ -28,8 +28,8 @@ Group
grpCombustionSolvers
Description
Transient solver for fires and turbulent diffusion flames with reacting
particle clouds, surface film and pyrolysis modelling.
Transient PIMPLE solver for fires and turbulent diffusion flames with
reacting Lagrangian parcels, surface film and pyrolysis modelling.
\*---------------------------------------------------------------------------*/
@ -49,15 +49,20 @@ Description
int main(int argc, char *argv[])
{
#include "postProcess.H"
#include "setRootCase.H"
#include "createTime.H"
#include "createMesh.H"
#include "createControl.H"
pimpleControl pimple(mesh);
#include "createFields.H"
#include "createFieldRefs.H"
#include "createMRF.H"
#include "createFvOptions.H"
#include "createClouds.H"
#include "createSurfaceFilmModel.H"
#include "createPyrolysisModel.H"
#include "createRadiationModel.H"
#include "initContinuityErrs.H"
#include "createTimeControls.H"
#include "compressibleCourantNo.H"
@ -72,7 +77,7 @@ int main(int argc, char *argv[])
while (runTime.run())
{
#include "readTimeControls.H"
#include "createTimeControls.H"
#include "compressibleCourantNo.H"
#include "solidRegionDiffusionNo.H"
#include "setMultiRegionDeltaT.H"
@ -86,10 +91,7 @@ int main(int argc, char *argv[])
surfaceFilm.evolve();
if(solvePyrolysisRegion)
{
pyrolysis.evolve();
}
pyrolysis.evolve();
if (solvePrimaryRegion)
{

View File

@ -4,7 +4,7 @@ volScalarField rAU(1.0/UEqn.A());
surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU));
volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p));
surfaceScalarField phig("phig", -rhorAUf*ghf*fvc::snGrad(rho)*mesh.magSf());
surfaceScalarField phig(-rhorAUf*ghf*fvc::snGrad(rho)*mesh.magSf());
surfaceScalarField phiHbyA
(
@ -25,10 +25,9 @@ while (pimple.correctNonOrthogonal())
{
fvScalarMatrix p_rghEqn
(
fvm::ddt(psi, p_rgh)
+ fvc::ddt(psi, rho)*gh
+ fvc::ddt(psi)*pRef
fvc::ddt(psi, rho)*gh
+ fvc::div(phiHbyA)
+ fvm::ddt(psi, p_rgh)
- fvm::laplacian(rhorAUf, p_rgh)
==
parcels.Srho()
@ -47,7 +46,7 @@ while (pimple.correctNonOrthogonal())
}
}
p = p_rgh + rho*gh + pRef;
p = p_rgh + rho*gh;
#include "rhoEqn.H"
#include "compressibleContinuityErrs.H"

View File

@ -1,62 +0,0 @@
if (pimple.dict().lookupOrDefault<bool>("hydrostaticInitialization", false))
{
volScalarField& ph_rgh = regIOobject::store
(
new volScalarField
(
IOobject
(
"ph_rgh",
"0",
mesh,
IOobject::MUST_READ,
IOobject::NO_WRITE
),
mesh
)
);
if (equal(runTime.value(), 0))
{
p = ph_rgh + rho*gh + pRef;
thermo.correct();
rho = thermo.rho();
label nCorr
(
pimple.dict().lookupOrDefault<label>("nHydrostaticCorrectors", 5)
);
for (label i=0; i<nCorr; i++)
{
surfaceScalarField rhof("rhof", fvc::interpolate(rho));
surfaceScalarField phig
(
"phig",
-rhof*ghf*fvc::snGrad(rho)*mesh.magSf()
);
// Update the pressure BCs to ensure flux consistency
constrainPressure(ph_rgh, rho, U, phig, rhof);
fvScalarMatrix ph_rghEqn
(
fvm::laplacian(rhof, ph_rgh) == fvc::div(phig)
);
ph_rghEqn.solve();
p = ph_rgh + rho*gh + pRef;
thermo.correct();
rho = thermo.rho();
Info<< "Hydrostatic pressure variation "
<< (max(ph_rgh) - min(ph_rgh)).value() << endl;
}
ph_rgh.write();
p_rgh = ph_rgh;
}
}

View File

@ -12,11 +12,12 @@ tmp<fv::convectionScheme<scalar>> mvConvection
{
reaction->correct();
dQ = reaction->dQ();
label inertIndex = -1;
volScalarField Yt(0.0*Y[0]);
forAll(Y, i)
{
if (i != inertIndex && composition.active(i))
if (Y[i].name() != inertSpecie)
{
volScalarField& Yi = Y[i];
@ -41,6 +42,10 @@ tmp<fv::convectionScheme<scalar>> mvConvection
Yi.max(0.0);
Yt += Yi;
}
else
{
inertIndex = i;
}
}
Y[inertIndex] = scalar(1) - Yt;

View File

@ -1,3 +0,0 @@
const volScalarField& psi = thermo.psi();
const volScalarField& T = thermo.T();
const label inertIndex(composition.species()[inertSpecie]);

View File

@ -1,5 +1,3 @@
#include "createRDeltaT.H"
Info<< "Creating reaction model\n" << endl;
autoPtr<combustionModels::psiCombustionModel> reaction
@ -13,14 +11,7 @@ thermo.validate(args.executable(), "h", "e");
basicMultiComponentMixture& composition = thermo.composition();
PtrList<volScalarField>& Y = composition.Y();
const word inertSpecie(thermo.lookup("inertSpecie"));
if (!composition.species().found(inertSpecie))
{
FatalIOErrorIn(args.executable().c_str(), thermo)
<< "Inert specie " << inertSpecie << " not found in available species "
<< composition.species()
<< exit(FatalIOError);
}
word inertSpecie(thermo.lookup("inertSpecie"));
volScalarField rho
(
@ -49,6 +40,8 @@ volVectorField U
volScalarField& p = thermo.p();
const volScalarField& psi = thermo.psi();
const volScalarField& T = thermo.T();
#include "compressibleCreatePhi.H"
@ -130,5 +123,3 @@ volScalarField dQ
mesh,
dimensionedScalar("dQ", dimEnergy/dimTime, 0.0)
);
#include "createMRF.H"

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -45,16 +45,17 @@ Description
int main(int argc, char *argv[])
{
#include "postProcess.H"
#include "setRootCase.H"
#include "createTime.H"
#include "createMesh.H"
#include "createControl.H"
pimpleControl pimple(mesh);
#include "createTimeControls.H"
#include "createRDeltaT.H"
#include "initContinuityErrs.H"
#include "createFields.H"
#include "createFieldRefs.H"
#include "createMRF.H"
#include "createFvOptions.H"
turbulence->validate();

View File

@ -1,5 +1,4 @@
EXE_INC = \
-I. \
-I$(FOAM_SOLVERS)/combustion/reactingFoam \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \

View File

@ -1,3 +0,0 @@
const volScalarField& psi = thermo.psi();
const volScalarField& T = thermo.T();
const label inertIndex(composition.species()[inertSpecie]);

View File

@ -1,5 +1,3 @@
#include "createRDeltaT.H"
Info<< "Creating reaction model\n" << endl;
autoPtr<combustionModels::rhoCombustionModel> reaction
@ -13,14 +11,7 @@ thermo.validate(args.executable(), "h", "e");
basicMultiComponentMixture& composition = thermo.composition();
PtrList<volScalarField>& Y = composition.Y();
const word inertSpecie(thermo.lookup("inertSpecie"));
if (!composition.species().found(inertSpecie))
{
FatalIOErrorIn(args.executable().c_str(), thermo)
<< "Inert specie " << inertSpecie << " not found in available species "
<< composition.species()
<< exit(FatalIOError);
}
word inertSpecie(thermo.lookup("inertSpecie"));
volScalarField rho
(
@ -49,6 +40,8 @@ volVectorField U
volScalarField& p = thermo.p();
const volScalarField& psi = thermo.psi();
const volScalarField& T = thermo.T();
#include "compressibleCreatePhi.H"
@ -130,5 +123,3 @@ volScalarField dQ
mesh,
dimensionedScalar("dQ", dimEnergy/dimTime, 0.0)
);
#include "createMRF.H"

View File

@ -28,8 +28,8 @@ Group
grpCombustionSolvers
Description
Solver for combustion with chemical reactions using a density based
thermodynamics package with enhanced buoyancy treatment.
Solver for combustion with chemical reactions using density based
thermodynamics package, using enahanced buoyancy treatment.
\*---------------------------------------------------------------------------*/
@ -46,16 +46,17 @@ Description
int main(int argc, char *argv[])
{
#include "postProcess.H"
#include "setRootCase.H"
#include "createTime.H"
#include "createMesh.H"
#include "createControl.H"
pimpleControl pimple(mesh);
#include "createTimeControls.H"
#include "createRDeltaT.H"
#include "initContinuityErrs.H"
#include "createFields.H"
#include "createFieldRefs.H"
#include "createMRF.H"
#include "createFvOptions.H"
turbulence->validate();

View File

@ -1,5 +1,4 @@
EXE_INC = \
-I. \
-I$(FOAM_SOLVERS)/combustion/reactingFoam \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \

View File

@ -1,3 +0,0 @@
const volScalarField& psi = thermo.psi();
const volScalarField& T = thermo.T();
const label inertIndex(composition.species()[inertSpecie]);

View File

@ -1,5 +1,3 @@
#include "createRDeltaT.H"
Info<< "Creating reaction model\n" << endl;
autoPtr<combustionModels::rhoCombustionModel> reaction
@ -13,14 +11,7 @@ thermo.validate(args.executable(), "h", "e");
basicMultiComponentMixture& composition = thermo.composition();
PtrList<volScalarField>& Y = composition.Y();
const word inertSpecie(thermo.lookup("inertSpecie"));
if (!composition.species().found(inertSpecie))
{
FatalIOErrorIn(args.executable().c_str(), thermo)
<< "Inert specie " << inertSpecie << " not found in available species "
<< composition.species()
<< exit(FatalIOError);
}
word inertSpecie(thermo.lookup("inertSpecie"));
volScalarField rho
(
@ -49,6 +40,8 @@ volVectorField U
volScalarField& p = thermo.p();
const volScalarField& psi = thermo.psi();
const volScalarField& T = thermo.T();
#include "compressibleCreatePhi.H"
@ -109,5 +102,3 @@ volScalarField dQ
mesh,
dimensionedScalar("dQ", dimEnergy/dimTime, 0.0)
);
#include "createMRF.H"

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -46,16 +46,17 @@ Description
int main(int argc, char *argv[])
{
#include "postProcess.H"
#include "setRootCase.H"
#include "createTime.H"
#include "createMesh.H"
#include "createControl.H"
pimpleControl pimple(mesh);
#include "createTimeControls.H"
#include "createRDeltaT.H"
#include "initContinuityErrs.H"
#include "createFields.H"
#include "createFieldRefs.H"
#include "createMRF.H"
#include "createFvOptions.H"
turbulence->validate();

View File

@ -58,24 +58,24 @@ License
// Flow time scale
{
rDeltaT.ref() =
rDeltaT.dimensionedInternalField() =
(
fvc::surfaceSum(mag(phi))()()
/((2*maxCo)*mesh.V()*rho())
fvc::surfaceSum(mag(phi))().dimensionedInternalField()
/((2*maxCo)*mesh.V()*rho.dimensionedInternalField())
);
// Limit the largest time scale
rDeltaT.max(1/maxDeltaT);
Info<< " Flow = "
<< gMin(1/rDeltaT.primitiveField()) << ", "
<< gMax(1/rDeltaT.primitiveField()) << endl;
<< gMin(1/rDeltaT.internalField()) << ", "
<< gMax(1/rDeltaT.internalField()) << endl;
}
// Reaction source time scale
if (alphaTemp < 1.0)
{
volScalarField::Internal rDeltaTT
volScalarField::DimensionedInternalField rDeltaTT
(
mag(reaction->Sh())/(alphaTemp*rho*thermo.Cp()*T)
);
@ -84,9 +84,9 @@ License
<< gMin(1/(rDeltaTT.field() + VSMALL)) << ", "
<< gMax(1/(rDeltaTT.field() + VSMALL)) << endl;
rDeltaT.ref() = max
rDeltaT.dimensionedInternalField() = max
(
rDeltaT(),
rDeltaT.dimensionedInternalField(),
rDeltaTT
);
}
@ -120,8 +120,8 @@ License
rDeltaT.correctBoundaryConditions();
Info<< " Overall = "
<< gMin(1/rDeltaT.primitiveField())
<< ", " << gMax(1/rDeltaT.primitiveField()) << endl;
<< gMin(1/rDeltaT.internalField())
<< ", " << gMax(1/rDeltaT.internalField()) << endl;
}

View File

@ -1,5 +1,6 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
set -x
wclean libso BCs
wclean

View File

@ -2,8 +2,10 @@
cd ${0%/*} || exit 1 # Run from this directory
# Parse arguments for library compilation
targetType=libso
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
set -x
(wmake $targetType BCs && wmake $targetType && wmake $targetType rhoCentralDyMFoam)
(wmake $targetType BCs && wmake && wmake rhoCentralDyMFoam)
#------------------------------------------------------------------------------

View File

@ -44,16 +44,17 @@ Description
\endvartable
Usage
\heading Patch usage
\table
Property | Description | Required | Default value
p | Pressure field name | no | p
psi | Compressibility field name | no | thermo:psi
Property | Description | Required | Default value
pName | Pressure field name | no | p
psiName | Compressibility field name | no | thermo:psi
\endtable
Example of the boundary condition specification:
\verbatim
<patchName>
myPatch
{
type fixedRho;
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -31,7 +31,7 @@ Description
if (mesh.nInternalFaces())
{
scalarField sumAmaxSf(fvc::surfaceSum(amaxSf)().primitiveField());
scalarField sumAmaxSf(fvc::surfaceSum(amaxSf)().internalField());
CoNum = 0.5*gMax(sumAmaxSf/mesh.V().field())*runTime.deltaTValue();

View File

@ -1,10 +0,0 @@
volScalarField& p = thermo.p();
const volScalarField& T = thermo.T();
const volScalarField& psi = thermo.psi();
const volScalarField& mu = thermo.mu();
bool inviscid(true);
if (max(mu.primitiveField()) > 0.0)
{
inviscid = false;
}

View File

@ -1,5 +1,3 @@
#include "createRDeltaT.H"
Info<< "Reading thermophysical properties\n" << endl;
autoPtr<psiThermo> pThermo
@ -8,7 +6,17 @@ autoPtr<psiThermo> pThermo
);
psiThermo& thermo = pThermo();
volScalarField& p = thermo.p();
volScalarField& e = thermo.he();
const volScalarField& T = thermo.T();
const volScalarField& psi = thermo.psi();
const volScalarField& mu = thermo.mu();
bool inviscid(true);
if (max(mu.internalField()) > 0.0)
{
inviscid = false;
}
Info<< "Reading field U\n" << endl;
volVectorField U

View File

@ -29,7 +29,7 @@ Group
Description
Density-based compressible flow solver based on central-upwind schemes of
Kurganov and Tadmor with support for mesh-motion and topology changes.
Kurganov and Tadmor with support for mesh-motion and topology changes
\*---------------------------------------------------------------------------*/
@ -39,22 +39,16 @@ Description
#include "turbulentFluidThermoModel.H"
#include "fixedRhoFvPatchScalarField.H"
#include "directionInterpolate.H"
#include "localEulerDdtScheme.H"
#include "fvcSmooth.H"
#include "motionSolver.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
int main(int argc, char *argv[])
{
#define NO_CONTROL
#include "postProcess.H"
#include "setRootCase.H"
#include "createTime.H"
#include "createDynamicFvMesh.H"
#include "createFields.H"
#include "createFieldRefs.H"
#include "createTimeControls.H"
turbulence->validate();
@ -194,11 +188,11 @@ int main(int argc, char *argv[])
// --- Solve momentum
solve(fvm::ddt(rhoU) + fvc::div(phiUp));
U.ref() =
rhoU()
/rho();
U.dimensionedInternalField() =
rhoU.dimensionedInternalField()
/rho.dimensionedInternalField();
U.correctBoundaryConditions();
rhoU.boundaryFieldRef() == rho.boundaryField()*U.boundaryField();
rhoU.boundaryField() == rho.boundaryField()*U.boundaryField();
if (!inviscid)
{
@ -232,7 +226,7 @@ int main(int argc, char *argv[])
e = rhoE/rho - 0.5*magSqr(U);
e.correctBoundaryConditions();
thermo.correct();
rhoE.boundaryFieldRef() ==
rhoE.boundaryField() ==
rho.boundaryField()*
(
e.boundaryField() + 0.5*magSqr(U.boundaryField())
@ -249,11 +243,11 @@ int main(int argc, char *argv[])
rhoE = rho*(e + 0.5*magSqr(U));
}
p.ref() =
rho()
/psi();
p.dimensionedInternalField() =
rho.dimensionedInternalField()
/psi.dimensionedInternalField();
p.correctBoundaryConditions();
rho.boundaryFieldRef() == psi.boundaryField()*p.boundaryField();
rho.boundaryField() == psi.boundaryField()*p.boundaryField();
turbulence->correct();

View File

@ -29,7 +29,7 @@ Group
Description
Density-based compressible flow solver based on central-upwind schemes of
Kurganov and Tadmor.
Kurganov and Tadmor
\*---------------------------------------------------------------------------*/
@ -45,15 +45,13 @@ Description
int main(int argc, char *argv[])
{
#define NO_CONTROL
#include "postProcess.H"
#include "setRootCase.H"
#include "createTime.H"
#include "createMesh.H"
#include "createFields.H"
#include "createFieldRefs.H"
#include "createTimeControls.H"
#include "createRDeltaT.H"
turbulence->validate();
@ -183,11 +181,11 @@ int main(int argc, char *argv[])
// --- Solve momentum
solve(fvm::ddt(rhoU) + fvc::div(phiUp));
U.ref() =
rhoU()
/rho();
U.dimensionedInternalField() =
rhoU.dimensionedInternalField()
/rho.dimensionedInternalField();
U.correctBoundaryConditions();
rhoU.boundaryFieldRef() == rho.boundaryField()*U.boundaryField();
rhoU.boundaryField() == rho.boundaryField()*U.boundaryField();
if (!inviscid)
{
@ -221,7 +219,7 @@ int main(int argc, char *argv[])
e = rhoE/rho - 0.5*magSqr(U);
e.correctBoundaryConditions();
thermo.correct();
rhoE.boundaryFieldRef() ==
rhoE.boundaryField() ==
rho.boundaryField()*
(
e.boundaryField() + 0.5*magSqr(U.boundaryField())
@ -238,11 +236,11 @@ int main(int argc, char *argv[])
rhoE = rho*(e + 0.5*magSqr(U));
}
p.ref() =
rho()
/psi();
p.dimensionedInternalField() =
rho.dimensionedInternalField()
/psi.dimensionedInternalField();
p.correctBoundaryConditions();
rho.boundaryFieldRef() == psi.boundaryField()*p.boundaryField();
rho.boundaryField() == psi.boundaryField()*p.boundaryField();
turbulence->correct();

View File

@ -11,10 +11,10 @@
);
// Set the reciprocal time-step from the local Courant number
rDeltaT.ref() = max
rDeltaT.dimensionedInternalField() = max
(
1/dimensionedScalar("maxDeltaT", dimTime, maxDeltaT),
fvc::surfaceSum(amaxSf)()()
fvc::surfaceSum(amaxSf)().dimensionedInternalField()
/((2*maxCo)*mesh.V())
);
@ -24,6 +24,6 @@
fvc::smooth(rDeltaT, rDeltaTSmoothingCoeff);
Info<< "Flow time scale min/max = "
<< gMin(1/rDeltaT.primitiveField())
<< ", " << gMax(1/rDeltaT.primitiveField()) << endl;
<< gMin(1/rDeltaT.internalField())
<< ", " << gMax(1/rDeltaT.internalField()) << endl;
}

View File

@ -1 +0,0 @@
const volScalarField& psi = thermo.psi();

View File

@ -1,5 +1,3 @@
#include "createRDeltaT.H"
Info<< "Reading thermophysical properties\n" << endl;
autoPtr<psiThermo> pThermo
@ -10,6 +8,7 @@ psiThermo& thermo = pThermo();
thermo.validate(args.executable(), "h", "e");
volScalarField& p = thermo.p();
const volScalarField& psi = thermo.psi();
volScalarField rho
(
@ -91,5 +90,3 @@ volScalarField dpdt
Info<< "Creating field kinetic energy K\n" << endl;
volScalarField K("K", 0.5*magSqr(U));
#include "createMRF.H"

View File

@ -9,7 +9,8 @@ EXE_INC = \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude \
-I$(LIB_SRC)/dynamicFvMesh/lnInclude \
-I$(LIB_SRC)/dynamicMesh/lnInclude
-I$(LIB_SRC)/dynamicMesh/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
EXE_LIBS = \
-lcompressibleTransportModels \
@ -23,4 +24,5 @@ EXE_LIBS = \
-lfvOptions \
-ldynamicFvMesh \
-ltopoChangerFvMesh \
-ldynamicMesh
-ldynamicMesh \
-lmeshTools

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -28,8 +28,8 @@ Group
grpCompressibleSolvers grpMovingMeshSolvers
Description
Transient solver for turbulent flow of compressible fluids for HVAC and
similar applications, with optional mesh motion and mesh topology changes.
Transient solver for laminar or turbulent flow of compressible fluids
for HVAC and similar applications.
Uses the flexible PIMPLE (PISO-SIMPLE) solution for time-resolved and
pseudo-transient simulations.
@ -51,15 +51,16 @@ Description
int main(int argc, char *argv[])
{
#include "postProcess.H"
#include "setRootCase.H"
#include "createTime.H"
#include "createDynamicFvMesh.H"
#include "createControl.H"
pimpleControl pimple(mesh);
#include "createRDeltaT.H"
#include "initContinuityErrs.H"
#include "createFields.H"
#include "createFieldRefs.H"
#include "createMRF.H"
#include "createFvOptions.H"
#include "createRhoUf.H"
#include "createControls.H"

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -28,8 +28,8 @@ Group
grpCompressibleSolvers
Description
Transient solver for turbulent flow of compressible fluids for HVAC and
similar applications.
Transient solver for laminar or turbulent flow of compressible fluids
for HVAC and similar applications.
Uses the flexible PIMPLE (PISO-SIMPLE) solution for time-resolved and
pseudo-transient simulations.
@ -49,16 +49,17 @@ Description
int main(int argc, char *argv[])
{
#include "postProcess.H"
#include "setRootCase.H"
#include "createTime.H"
#include "createMesh.H"
#include "createControl.H"
pimpleControl pimple(mesh);
#include "createTimeControls.H"
#include "createRDeltaT.H"
#include "initContinuityErrs.H"
#include "createFields.H"
#include "createFieldRefs.H"
#include "createMRF.H"
#include "createFvOptions.H"
turbulence->validate();

View File

@ -26,11 +26,11 @@
volScalarField rDeltaT0("rDeltaT0", rDeltaT);
// Set the reciprocal time-step from the local Courant number
rDeltaT.ref() = max
rDeltaT.dimensionedInternalField() = max
(
1/dimensionedScalar("maxDeltaT", dimTime, maxDeltaT),
fvc::surfaceSum(mag(phi))()()
/((2*maxCo)*mesh.V()*rho())
fvc::surfaceSum(mag(phi))().dimensionedInternalField()
/((2*maxCo)*mesh.V()*rho.dimensionedInternalField())
);
if (pimple.transonic())
@ -41,11 +41,11 @@
fvc::interpolate(psi)*fvc::flux(U)
);
rDeltaT.ref() = max
rDeltaT.dimensionedInternalField() = max
(
rDeltaT(),
fvc::surfaceSum(mag(phid))()()
/((2*maxCo)*mesh.V()*psi())
rDeltaT.dimensionedInternalField(),
fvc::surfaceSum(mag(phid))().dimensionedInternalField()
/((2*maxCo)*mesh.V()*psi.dimensionedInternalField())
);
}
@ -53,8 +53,8 @@
rDeltaT.correctBoundaryConditions();
Info<< "Flow time scale min/max = "
<< gMin(1/rDeltaT.primitiveField())
<< ", " << gMax(1/rDeltaT.primitiveField()) << endl;
<< gMin(1/rDeltaT.internalField())
<< ", " << gMax(1/rDeltaT.internalField()) << endl;
if (rDeltaTSmoothingCoeff < 1.0)
{
@ -62,8 +62,8 @@
}
Info<< "Smoothed flow time scale min/max = "
<< gMin(1/rDeltaT.primitiveField())
<< ", " << gMax(1/rDeltaT.primitiveField()) << endl;
<< gMin(1/rDeltaT.internalField())
<< ", " << gMax(1/rDeltaT.internalField()) << endl;
// Limit rate of change of time scale
// - reduce as much as required
@ -79,7 +79,7 @@
*max(rDeltaT/rDeltaT0, scalar(1) - rDeltaTDampingCoeff);
Info<< "Damped flow time scale min/max = "
<< gMin(1/rDeltaT.primitiveField())
<< ", " << gMax(1/rDeltaT.primitiveField()) << endl;
<< gMin(1/rDeltaT.internalField())
<< ", " << gMax(1/rDeltaT.internalField()) << endl;
}
}

View File

@ -1 +0,0 @@
const volScalarField& psi = thermo.psi();

View File

@ -1,9 +1,10 @@
Info<< "Reading thermophysical properties\n" << endl;
autoPtr<rhoThermo> pThermo
autoPtr<psiThermo> pThermo
(
rhoThermo::New(mesh)
psiThermo::New(mesh)
);
rhoThermo& thermo = pThermo();
psiThermo& thermo = pThermo();
thermo.validate(args.executable(), "h", "e");
volScalarField rho
@ -20,6 +21,7 @@ volScalarField rho
);
volScalarField& p = thermo.p();
const volScalarField& psi = thermo.psi();
Info<< "Reading field U\n" << endl;
volVectorField U
@ -79,5 +81,3 @@ autoPtr<compressible::turbulenceModel> turbulence
);
dimensionedScalar initialMass = fvc::domainIntegrate(rho);
#include "createMRF.H"

View File

@ -1,6 +1,4 @@
{
//const volScalarField& psi = thermo.psi();
volScalarField rAU(1.0/UEqn.A());
surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU));
volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p));
@ -95,9 +93,6 @@
rho = max(rho, rhoMin);
rho = min(rho, rhoMax);
thermo.rho() = max(thermo.rho(), rhoMin);
thermo.rho() = min(thermo.rho(), rhoMax);
if (!simple.transonic())
{
rho.relax();

View File

@ -109,8 +109,6 @@ if (closedVolume)
rho = thermo.rho();
rho = max(rho, rhoMin);
rho = min(rho, rhoMax);
thermo.rho() = max(thermo.rho(), rhoMin);
thermo.rho() = min(thermo.rho(), rhoMax);
if (!simple.transonic())
{

View File

@ -1,5 +1,4 @@
EXE_INC = \
-I. \
-I.. \
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \

View File

@ -80,5 +80,3 @@ autoPtr<compressible::turbulenceModel> turbulence
);
dimensionedScalar initialMass = fvc::domainIntegrate(rho);
#include "createMRF.H"

View File

@ -86,10 +86,6 @@
rho = thermo.rho();
rho = max(rho, rhoMin);
rho = min(rho, rhoMax);
thermo.rho() = max(thermo.rho(), rhoMin);
thermo.rho() = min(thermo.rho(), rhoMax);
rho.relax();
Info<< "rho max/min : "
<< max(rho).value() << " "

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -28,8 +28,9 @@ Group
grpCompressibleSolvers
Description
Steady-state solver for turbulent flow of compressible fluids, with
implicit or explicit porosity treatment and optional sources.
Steady-state solver for turbulent flow of compressible fluids with
RANS turbulence modelling, implicit or explicit porosity treatment
and run-time selectable finite volume sources.
\*---------------------------------------------------------------------------*/
@ -44,13 +45,14 @@ Description
int main(int argc, char *argv[])
{
#include "postProcess.H"
#include "setRootCase.H"
#include "createTime.H"
#include "createMesh.H"
#include "createControl.H"
simpleControl simple(mesh);
#include "createFields.H"
#include "createMRF.H"
#include "createFvOptions.H"
#include "createZones.H"
#include "initContinuityErrs.H"

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -28,12 +28,13 @@ Group
grpCompressibleSolvers
Description
Steady-state solver for turbulent flow of compressible fluids.
Steady-state SIMPLE solver for laminar or turbulent RANS flow of
compressible fluids.
\*---------------------------------------------------------------------------*/
#include "fvCFD.H"
#include "rhoThermo.H"
#include "psiThermo.H"
#include "turbulentFluidThermoModel.H"
#include "simpleControl.H"
#include "fvOptions.H"
@ -42,14 +43,14 @@ Description
int main(int argc, char *argv[])
{
#include "postProcess.H"
#include "setRootCase.H"
#include "createTime.H"
#include "createMesh.H"
#include "createControl.H"
simpleControl simple(mesh);
#include "createFields.H"
#include "createFieldRefs.H"
#include "createMRF.H"
#include "createFvOptions.H"
#include "initContinuityErrs.H"

View File

@ -1,4 +1,5 @@
EXE_INC = \
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \

View File

@ -1,2 +0,0 @@
volScalarField& e = thermo.he();
const volScalarField& psi = thermo.psi();

View File

@ -8,6 +8,8 @@ psiThermo& thermo = pThermo();
thermo.validate(args.executable(), "e");
volScalarField& p = thermo.p();
volScalarField& e = thermo.he();
const volScalarField& psi = thermo.psi();
volScalarField rho
(
@ -52,5 +54,3 @@ autoPtr<compressible::turbulenceModel> turbulence
Info<< "Creating field kinetic energy K\n" << endl;
volScalarField K("K", 0.5*magSqr(U));
#include "createMRF.H"

View File

@ -2,6 +2,7 @@ EXE_INC = \
-I.. \
-I../../rhoPimpleFoam/rhoPimpleDyMFoam \
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -28,8 +28,8 @@ Group
grpCompressibleSolvers grpMovingMeshSolvers
Description
Transient solver for trans-sonic/supersonic, turbulent flow of a
compressible gas, with optional mesh motion and mesh topology changes.
Transient solver for trans-sonic/supersonic, laminar or turbulent flow
of a compressible gas with mesh motion..
\*---------------------------------------------------------------------------*/
@ -45,20 +45,20 @@ Description
int main(int argc, char *argv[])
{
#include "postProcess.H"
#include "setRootCase.H"
#include "createTime.H"
#include "createDynamicFvMesh.H"
#include "createControl.H"
#include "initContinuityErrs.H"
pimpleControl pimple(mesh);
#include "createControls.H"
#include "createFields.H"
#include "createFieldRefs.H"
#include "createMRF.H"
#include "createFvOptions.H"
#include "createRhoUf.H"
#include "compressibleCourantNo.H"
#include "setInitialDeltaT.H"
#include "initContinuityErrs.H"
turbulence->validate();

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -28,8 +28,8 @@ Group
grpCompressibleSolvers
Description
Transient solver for trans-sonic/supersonic, turbulent flow of a
compressible gas.
Transient solver for trans-sonic/supersonic, laminar or turbulent flow
of a compressible gas.
\*---------------------------------------------------------------------------*/
@ -43,14 +43,14 @@ Description
int main(int argc, char *argv[])
{
#include "postProcess.H"
#include "setRootCase.H"
#include "createTime.H"
#include "createMesh.H"
#include "createControl.H"
pimpleControl pimple(mesh);
#include "createFields.H"
#include "createFieldRefs.H"
#include "createMRF.H"
#include "createFvOptions.H"
#include "initContinuityErrs.H"

View File

@ -1,6 +1,3 @@
#include "readThermodynamicProperties.H"
#include "readTransportProperties.H"
Info<< "Reading field p\n" << endl;
volScalarField p
(

View File

@ -40,12 +40,14 @@ Description
int main(int argc, char *argv[])
{
#include "postProcess.H"
#include "setRootCase.H"
#include "createTime.H"
#include "createMesh.H"
#include "createControl.H"
pimpleControl pimple(mesh);
#include "readThermodynamicProperties.H"
#include "readTransportProperties.H"
#include "createFields.H"
#include "initContinuityErrs.H"

View File

@ -1,2 +0,0 @@
Info<< nl << "Constructing dsmcCloud " << endl;
dsmcCloud dsmc("dsmc", mesh);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -28,8 +28,8 @@ Group
grpDiscreteMethodsSolvers
Description
Direct simulation Monte Carlo (DSMC) solver for, transient, multi-species
flows.
Direct simulation Monte Carlo (DSMC) solver for 3D, transient, multi-
species flows
\*---------------------------------------------------------------------------*/
@ -40,16 +40,16 @@ Description
int main(int argc, char *argv[])
{
#define NO_CONTROL
#include "postProcess.H"
#include "setRootCase.H"
#include "createTime.H"
#include "createMesh.H"
#include "createFields.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info<< nl << "Constructing dsmcCloud " << endl;
dsmcCloud dsmc("dsmc", mesh);
Info<< "\nStarting time loop\n" << endl;
while (runTime.loop())

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -28,7 +28,7 @@ Group
grpDiscreteMethodsSolvers
Description
Solver to equilibrate and/or precondition molecular dynamics systems.
Equilibrates and/or preconditions molecular dynamics systems
\*---------------------------------------------------------------------------*/
@ -85,7 +85,7 @@ int main(int argc, char *argv[])
runTime.write();
if (runTime.writeTime())
if (runTime.outputTime())
{
nAveragingSteps = 0;
}

View File

@ -1,17 +1,55 @@
Info<< "\nReading field U\n" << endl;
volVectorField U
(
IOobject
Info<< "\nReading field U\n" << endl;
volVectorField U
(
IOobject
(
"U",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
word polyatomicCloudName("polyatomicCloud");
potential polyPot
(
"U",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
IOdictionary
(
IOobject
(
polyatomicCloudName + "Properties",
mesh.time().constant(),
mesh,
IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE,
false
)
)
);
potential pot(mesh);
polyatomicCloud polyatomics(polyatomicCloudName, mesh, polyPot);
moleculeCloud molecules(mesh, pot);
word monoatomicCloudName("monoatomicCloud");
potential monoPot
(
mesh,
IOdictionary
(
IOobject
(
monoatomicCloudName + "Properties",
mesh.time().constant(),
mesh,
IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE,
false
)
)
);
monoatomicCloud monoatomics(monoatomicCloudName, mesh, monoPot);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -28,28 +28,41 @@ Group
grpDiscreteMethodsSolvers
Description
Molecular dynamics solver for fluid dynamics.
Molecular dynamics solver for fluid dynamics
\*---------------------------------------------------------------------------*/
#include "fvCFD.H"
#include "md.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
int main(int argc, char *argv[])
{
#define NO_CONTROL
#include "postProcess.H"
#include "setRootCase.H"
#include "createTime.H"
#include "createMesh.H"
#include "createFields.H"
#include "temperatureAndPressureVariables.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info<< "\nReading field U\n" << endl;
volVectorField U
(
IOobject
(
"U",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
potential pot(mesh);
moleculeCloud molecules(mesh, pot);
#include "temperatureAndPressureVariables.H"
label nAveragingSteps = 0;
Info<< "\nStarting time loop\n" << endl;
@ -63,11 +76,12 @@ int main(int argc, char *argv[])
molecules.evolve();
#include "meanMomentumEnergyAndNMols.H"
#include "temperatureAndPressure.H"
runTime.write();
if (runTime.writeTime())
if (runTime.outputTime())
{
nAveragingSteps = 0;
}

View File

@ -1,2 +0,0 @@
pisoControl piso(mesh);
pisoControl bpiso(mesh, "BPISO");

View File

@ -1,49 +1,47 @@
IOobject phiBHeader
(
"phiB",
runTime.timeName(),
mesh,
IOobject::NO_READ
);
IOobject phiBHeader
(
"phiB",
runTime.timeName(),
mesh,
IOobject::NO_READ
);
surfaceScalarField* phiBPtr = nullptr;
surfaceScalarField* phiBPtr;
if (phiBHeader.typeHeaderOk<surfaceScalarField>(true))
{
Info<< "Reading face flux ";
{
Info<< "Reading field phiB\n" << endl;
phiBPtr = new surfaceScalarField
(
IOobject
phiBPtr = new surfaceScalarField
(
"phiB",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
}
else
{
Info<< "Calculating face flux ";
IOobject
(
"phiB",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
}
else
{
Info<< "Calculating face flux\n" << endl;
phiBPtr = new surfaceScalarField
(
IOobject
phiBPtr = new surfaceScalarField
(
"phiB",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
fvc::flux(B)
);
}
IOobject
(
"phiB",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
fvc::flux(B)
);
}
surfaceScalarField& phiB = *phiBPtr;
Info<< phiB.name() << nl << endl;
surfaceScalarField& phiB = *phiBPtr;

View File

@ -58,12 +58,14 @@ Description
int main(int argc, char *argv[])
{
#include "postProcess.H"
#include "setRootCase.H"
#include "createTime.H"
#include "createMesh.H"
#include "createControl.H"
pisoControl piso(mesh);
pisoControl bpiso(mesh, "BPISO");
#include "createFields.H"
#include "initContinuityErrs.H"

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -40,10 +40,8 @@ Description
int main(int argc, char *argv[])
{
#define NO_CONTROL
#include "postProcess.H"
#include "setRootCase.H"
#include "createTime.H"
#include "createMesh.H"
#include "createFields.H"
@ -74,7 +72,7 @@ int main(int argc, char *argv[])
runTime.write();
if (runTime.writeTime())
if (runTime.outputTime())
{
writeCellGraph(V, runTime.graphFormat());
writeCellGraph(delta, runTime.graphFormat());

Some files were not shown because too many files have changed in this diff Show More