Commit Graph

2325 Commits

Author SHA1 Message Date
19da21ed93 mirrorMesh: Added support for cellLevel and pointLevel to support dynamic mesh refinement
Patch contributed by Mattijs Janssens
Resolves bug-report https://bugs.openfoam.org/view.php?id=2712
2017-10-27 14:58:26 +01:00
daee51f762 Matrix: Corrected size of field resulting from rectangular matrix multiplication
Resolves bug-report https://bugs.openfoam.org/view.php?id=2740
2017-10-26 15:52:27 +01:00
c2ea77a4b8 cloudSolution::solveThisStep: Do not require cloud solution during for a write-time 2017-10-24 16:01:32 +01:00
8d82645f68 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2017-10-23 22:23:15 +01:00
a096a491fc simpleFoam: moved createFvOptions.H into createFields.H for -postProcess option
To unsure fvOptions are instantiated for post-processing createFvOptions.H must
be included in createFields.H rather than in the solver directly.

Resolves bug-report https://bugs.openfoam.org/view.php?id=2733
2017-10-23 22:20:52 +01:00
9cb8b71e06 waveAlphaFvPatchScalarField: Write liquid flag
Resolves bug report https://bugs.openfoam.org/view.php?id=2734
2017-10-23 16:23:39 +01:00
d4c479cb64 RBD: restraints: Corrected restraint force transformations
The restraints generate either joint-local (tau) or global (fx) forces.
At the moment they all generate the latter. This change corrects three
of the four restraints so that the forces are in the gobal coordinate
system and not the local coordinate system of the body.

The problem with this is that the forward dynamics code then transforms
most of the forces back to the body local coordinate system. A better
solution would be to associate restraints which are more sensibly
defined in a local frame with the joints instead of the bodies, and
return the forces as part of the tau variable.
2017-10-20 16:02:43 +01:00
6d06f737cd functionObjects: nearWallFields: Fixed failed patch faces
Corrected a few issues with the utilisation of the tracking within the
nearWallFields function object. The tracking is now done over a
displacement from the initial location, which prevents trying to track
to a location outside the mesh when the patch face is warped and the
centre lies outside the tracking decomposition. Also fixed the end
criteria so that it does not suffer from round off error in the step
fraction.

The upshot of these changes is that the faces on which the near wall
cells were not being set are now being set properly, and uninitialised
data is no longer being written out.
2017-10-20 15:15:39 +01:00
9a0cb92f5b semiPermeableBaffleVelocityFvPatchVectorField: Use NullObjectRef rather than static_cast
Removes warning from Clang
2017-10-20 12:23:34 +01:00
aa24a97c8b functionObjects: nearWallFields: Fixed particle not found error
Removed all the special handling for awkward particles from the
nearWallFields function object. The version 5+ tracking already handles
this more robustly.

Resolves bug-report https://bugs.openfoam.org/view.php?id=2728
2017-10-20 11:38:13 +01:00
aaa8405bd1 dictionary::functionEntry: Write new line at end of entry
Resolves bug-report https://bugs.openfoam.org/view.php?id=2726
2017-10-20 11:33:38 +01:00
e903a088ee functionObjects::nearWallFields: Set patch types of the sampled field to calculated
Resolves bug-report https://bugs.openfoam.org/view.php?id=2729
2017-10-20 10:38:05 +01:00
18db980e94 surfaceFilmModels::standardPhaseChange: Add support for treating YInf as zero
by setting the optional switch YInfZero to true.
2017-10-19 17:49:46 +01:00
8c4c455dbe Added semi permeable baffle library to build 2017-10-19 12:12:56 +01:00
3055587a5c semiPermeableBaffle: Added two new boundary conditions and a tutorial
Two boundary conditions for the modelling of semi-permeable baffles have
been added. These baffles are permeable to a number of species within
the flow, and are impermeable to others. The flux of a given species is
calculated as a constant multipled by the drop in mass fraction across
the baffle.

The species mass-fraction condition requires the transfer constant and
the name of the patch on the other side of the baffle:

boundaryField
{
    // ...

    membraneA
    {
        type            semiPermeableBaffleMassFraction;
        samplePatch     membranePipe;
        c               0.1;
        value           uniform 0;
    }
    membraneB
    {
        type            semiPermeableBaffleMassFraction;
        samplePatch     membraneSleeve;
        c               0.1;
        value           uniform 1;
    }
}

If the value of c is omitted, or set to zero, then the patch is
considered impermeable to the species in question. The samplePatch entry
can also be omitted in this case.

The velocity condition does not require any special input:

boundaryField
{
    // ...

    membraneA
    {
        type            semiPermeableBaffleVelocity;
        value           uniform (0 0 0);
    }
    membraneB
    {
        type            semiPermeableBaffleVelocity;
        value           uniform (0 0 0);
    }
}

These two boundary conditions must be used in conjunction, and the
mass-fraction condition must be applied to all species in the
simulation. The calculation will fail with an error message if either is
used in isolation.

A tutorial, combustion/reactingFoam/RAS/membrane, has been added which
demonstrates this transfer process.

This work was done with support from Stefan Lipp, at BASF.
2017-10-19 11:51:38 +01:00
38e33e0a34 fvOptions::PhaseLimitStabilization: New fvOption to stabilize phase transport equations
in the limit of the phase fraction -> 0

Can be used with the Maxwell non-Newtonian laminar stress model when used in
multiphase solvers.
2017-10-18 15:01:21 +01:00
6584fa6ce0 functionObjects::wallHeatFlux: More efficient evaluation of heat-flux
which avoids the need for field interpolation and snGrad specification and
evaluation.

Resolves patch request https://bugs.openfoam.org/view.php?id=2725
2017-10-17 12:17:24 +01:00
25c3c683c5 externalWallHeatFluxTemperatureFvPatchScalarField: Set size of option fields before mapping
Resolves problem with reconstruction
2017-10-16 17:16:22 +01:00
bf74d135d3 blackBodyEmission: correct non-coupled boundary values
Resolves bug-report https://bugs.openfoam.org/view.php?id=2709
2017-10-13 17:17:45 +01:00
8f5a3875f6 blockMesh: Corrected diagram printed with "-help" to be consistent with the documentation
Resolves bug report https://bugs.openfoam.org/view.php?id=2710
2017-10-13 11:28:01 +01:00
d923beb85b functionObjects: forces: Write global and local values on the same line
The forces function object, when specified with a full coordinate
system, previously wrote forces and moments out in the following format:

    time-0 forces-0 moments-0
    time-0 localForces-0 localMoments-0
    time-1 forces-1 moments-1
    time-1 localForces-1 localMoments-1
    # etc ...

There are two rows of values per time. This complicates the definition
of the table and means that filtering has to be done before the data
series can be visualised. The format has now been changed to the
following form:

    time-0 forces-0 moments-0 localForces-0 localMoments-0
    time-1 forces-1 moments-1 localForces-1 localMoments-1
    # etc ...

There is one row per time, and each column is therefore a continuous
series of one variable that can be plotted.
2017-10-12 10:43:19 +01:00
20aa72ff67 fvMeshSubset: Added coupled patch handling for small subsets 2017-10-12 09:33:55 +01:00
8c5d9fcf29 TurbulenceModels: Obtain the group name from alphaRhoPhi rather than U
to support multiphase solvers in which the phases have the same velocity field.
2017-10-11 22:47:08 +01:00
877b0c2f7d TurbulenceModels: Obtain the group name from alphaRhoPhi rather than U
to support multiphase solvers in which the phases have the same velocity field.
2017-10-11 21:59:32 +01:00
c756b5bee8 constantFilmThermo: Added missing data member constructor call 2017-10-11 11:46:51 +01:00
f9efe68ee3 PatchInteraction: Added "none" to list of interaction type names 2017-10-10 09:16:19 +01:00
e61590cbcf blockMesh: Added switch to disable face correspondence checking
To disable face correspondence checking set

    checkFaceCorrespondence off;

in blockMeshDict.  This is necessary in the rare cases where adjacent block
faces do not need to correspond because they are geometrically collapsed,
e.g. to form a pole/axis.

Resolves bug-report https://bugs.openfoam.org/view.php?id=2711
2017-10-09 21:33:02 +01:00
e181361539 PBiCG, PBiCGStab, PCG: Changed maxIter test to pre-increment counter
Resolves bug-report https://bugs.openfoam.org/view.php?id=2716
2017-10-09 12:23:28 +01:00
f11787ae2f fvOptions: Added support for transport equations involving d2dt2
Added incompressible solver support to the buoyancyForce fvOption
2017-10-06 15:33:33 +01:00
f73d9ea399 solidParticle: Removed unused local variable 2017-10-05 11:12:43 +01:00
d24899834d NamedEnum: Changed indexing to unsigned int 2017-10-05 11:12:00 +01:00
c095b5b89f waves: Fixed compilation with Clang 2017-10-02 11:00:47 +01:00
d9fc7eb887 waves: Pressure-velocity boundary formulation
A wavePressure boundary condition has been added, and the Airy-type wave
models have been extended to generate the unsteady pressure field. This
provides another option for specifying wave motion at a boundary.

If a waveVelocity condition is used in isolation, then any outlet flow
will be extrapolated and scaled to match the required flow rate. This is
similar to how a flowRateOutletVelocity condition works.

0/U:

    <patchName>
    {
        type        waveVelocity;
        // wave parameters ...
    }

0/p_rgh:

    <patchName>
    {
        type        fixedFluxPressure;
    }

If a waveVelocity is used in conjunction with the new wavePressure
condition, then one will set the value and the other the gradient, as
appropriate for the direction of the flow.

0/U:

    <patchName>
    {
        type        waveVelocity;
        // wave parameters ...
        p           p_rgh;
    }

0/p_rgh:

    <patchName>
    {
        type        wavePressure;
    }

This new pressure-velocity formulation is less stable, but generates
more accurate waveforms on patches where the velocity reverses. It is
also necessary for sub-surface cases where fixing the velocity around
the entire domain generates a continuity error.

This work was supported by Alice Gillespie, on behalf of M3 Wave
2017-10-02 09:15:31 +01:00
63c18662dd levelSet: Bug fix to volField levelSetAverage 2017-10-02 09:15:30 +01:00
1d0c7cf773 fvMeshSubset: Removed debugging output 2017-10-02 09:15:30 +01:00
9bcc185650 waveModels: Added pressure evaluation 2017-10-02 09:15:30 +01:00
a53b263b7f levelSet: Added volField-based functions 2017-10-02 09:15:30 +01:00
422556fd3f sixDoFRigidBodyState: Moved to src to avoid build order problems
Resolves bug-report https://bugs.openfoam.org/view.php?id=2707
2017-09-27 11:32:46 +01:00
85fbc130c7 functionObjects: Added sixDoF state library to Allwmake 2017-09-25 13:32:58 +01:00
fa3ed3b82d integrationSchemes: Further simplification and optimisation
Removed templating from integration schemes, improved the name
convention, and optimised the utilisation so that the virtual call is
only made once per integration in the KinematicParcel and the
ThermoParcel.
2017-09-25 08:52:52 +01:00
a5806207c3 lagrangian: Rewrite of integration schemes and transfer terms
The integration of force and heat transfer onto the particle is
facilitated by a run-time-selectable integration scheme. These schemes
were written to generate the value at the end of an intregration step
and also an average value over the step from which the total transfer
was computed.

The average value in the Euler scheme was implemented incorrectly, which
resulted in the momentum and heat transfer processes being
non-conservative. Implementing the average correctly, however, would
have inteoduced a number of trancendental functions which would have
negated the purpose of the Euler scheme as the cheap and stable option.

The schemes have been rewritten to generate changes over the step,
rather than the final value. This change is then used to calculate the
transfers. Regardless of the scheme, this formulation is guaranteed to
be conservative, and the Euler scheme remains computationally
inexpensive.

This change was made with help from Timo Niemi, VTT
This resolves bug report https://bugs.openfoam.org/view.php?id=2666
2017-09-25 08:52:52 +01:00
5bcaf1d18b thermoSingleLayer: Reinstate support for externalWallHeatFluxTemperature 2017-09-22 11:55:18 +01:00
cc400016f4 fvOptions: verticalDamping: Documentation fixes 2017-09-20 16:19:25 +01:00
50912f87cf engineFoam: Renamed engineFoam -> XiEngineFoam and sprayEngineFoam -> engineFoam
XiEngineFoam is a premixed/partially-premixed combustion engine solver which
exclusively uses the Xi flamelet combustion model.

engineFoam is a general engine solver for inhomogeneous combustion with or
without spray supporting run-time selection of the chemistry-based combustion
model.
2017-09-19 17:01:54 +01:00
a7330bbffc argList: Minor format correction 2017-09-19 09:30:50 +01:00
04d5f803b9 engineTime: Generalized to provide run-time selection of piston-motion
Standard crank-connecting rod and the new free-piston kinematics motion options
are provides, others can easily be added.

Contributed by Francesco Contino and Nicolas Bourgeois, BURN Research Group.
2017-09-19 09:26:26 +01:00
881c886499 viscosityModels::powerLaw: Changed VSMALL to SMALL to avoid potential overflow 2017-09-14 21:57:47 +01:00
018adc16c9 Corrected file conditional compilation macro names to be consistency with the file names
Scripts contributed by Bruno Santos
Resolves request https://bugs.openfoam.org/view.php?id=2692#c8735
2017-09-12 13:39:48 +01:00
6832a4375e lagrangian: Optimised reduced-dimension constraints
The 4.x tracking enforces reduced dimensionality on the parcels by
moving them to the centre of the mesh at the start of each track,
without considering the topology. This can leave the parcel outside it's
associated tetrahedron.

The barycentric algorithm isn't tolerant to incorrect topology, so
instead of changing position, it was written to track to the mesh
centre. This worked, but effectively doubled the number of tracking
calls. This additional cost has now been removed by absorbing the
constraint displacement into the existing motion track, so that the same
number of tracking steps are performed as before.

Partially resolves bug report https://bugs.openfoam.org/view.php?id=2688
2017-09-12 08:39:58 +01:00
27ca59be80 functionObjects: Rationalized the use of "tab" rather than token::TAB 2017-09-09 19:03:16 +01:00