Commit Graph

462 Commits

Author SHA1 Message Date
8c4f6b8fcb Standardized cell, patch and face loop index names 2016-04-25 10:28:32 +01:00
6a27f7af46 boundaryField() -> boundaryFieldRef() 2016-04-24 22:07:37 +01:00
40ec00b575 Updated header 2016-04-23 23:38:10 +01:00
77cad08dfa boundaryField() -> boundaryFieldRef() 2016-04-23 23:37:53 +01:00
2c6b405043 fireFoam: Added optional hydrostatic initialization of the pressure and density
Also added the new prghTotalHydrostaticPressure p_rgh BC which uses the
hydrostatic pressure field as the reference state for the far-field
which provides much more accurate entrainment is large open domains
typical of many fire simulations.

The hydrostatic field solution is controlled by the optional entries in
the fvSolution.PIMPLE dictionary, e.g.

    hydrostaticInitialization yes;
    nHydrostaticCorrectors 5;

and the solver must also be specified for the hydrostatic p_rgh field
ph_rgh e.g.

    ph_rgh
    {
        $p_rgh;
    }

Suitable boundary conditions for ph_rgh cannot always be derived from
those for p_rgh and so the ph_rgh is read to provide them.

To avoid accuracy issues with IO, restart and post-processing the p_rgh
and ph_rgh the option to specify a suitable reference pressure is
provided via the optional pRef file in the constant directory, e.g.

    dimensions      [1 -1 -2 0 0 0 0];
    value           101325;

which is used in the relationship between p_rgh and p:

    p = p_rgh + rho*gh + pRef;

Note that if pRef is specified all pressure BC specifications in the
p_rgh and ph_rgh files are relative to the reference to avoid round-off
errors.

For examples of suitable BCs for p_rgh and ph_rgh for a range of
fireFoam cases please study the tutorials in
tutorials/combustion/fireFoam/les which have all been updated.

Henry G. Weller
CFD Direct Ltd.
2016-04-23 10:04:39 +01:00
6a9101990e JohnsonJacksonSchaefferFrictionalStress: Updated I2D expression 2016-04-22 15:13:45 +01:00
6edac8f9ca reactingTwoPhaseEulerFoam: Corrected kineticTheory frictional stress at walls
Patch contributed by Juho Peltola, VTT

The new JohnsonJacksonSchaefferFrictionalStress model is included and
the LBend tutorial case to demonstrate the need for the changes to the
frictional stress models.

Resolves bug-report http://www.openfoam.org/mantisbt/view.php?id=2058
2016-04-22 14:25:58 +01:00
f33b40c202 foamCalcFunctions: Avoid the inclusion of fvCFD.H 2016-04-22 14:21:50 +01:00
0da5b0f989 Updated headers 2016-04-21 21:07:28 +01:00
d327a3f431 utilities/mesh/manipulation: Rationalized "End" message 2016-04-21 21:06:45 +01:00
1c2c1d83e7 transformPoints: Added "End" message
Resolves bug-report http://www.openfoam.org/mantisbt/view.php?id=2059
2016-04-21 21:05:47 +01:00
76e22b44ea applications/test/rigidBodyDynamics/pendulumAndSpring: Another slightly more complex test 2016-04-17 15:47:03 +01:00
287603474a vector::zero -> Zero 2016-04-16 18:34:41 +01:00
fc32d53828 quaternion/septernion: Added multi- quaternion/septernion averaging
Using method based on
http://ntrs.nasa.gov/archive/nasa/casi.ntrs.nasa.gov/20070017872.pdf
but simplified for the case where the quaternions are similar.
2016-04-16 15:59:05 +01:00
6a5d5e903e septernion: Changed definition of the forward transformation for consistency with spatialTransform
inline Foam::vector Foam::septernion::transformPoint(const vector& v) const
{
    return r().transform(v - t());
}

Now there is a 1:1 correspondence between septernion and
spatialTransform and a septernion constructor from spatialTransform
provided.

Additionally "septernion::transform" has been renamed
"septernion::transformPoint" to clarify that it transforms coordinate
points rather than displacements or other relative vectors.
2016-04-15 11:27:18 +01:00
bc70e36915 rigidBodyDynamics: Removed quaternion counter and index: 'nw', 'wIndex'
Replaced with 'unitQuaterion()' virtual function to indicate if the
joint uses a unit quaternion to represent rotation.
2016-04-12 22:17:52 +01:00
df1cb90dc6 rigidBodyDynamics: Simplify handling of quaternions by maintaining a unit quaternion in the joint state field 'q'
'w' is now obtained from 'v' using the relation w = sqrt(1 - |sqr(v)|)
and 'v' is stored in the joint state field 'q' and integrated in the
usual manner but corrected using quaternion transformations.
2016-04-12 21:44:34 +01:00
4a7f5ed19a applications/test/rigidBodyDynamics/sphericalJoint: Test for the quaternion-based spherical joint 2016-04-12 16:37:52 +01:00
b2563a8f1b applications/test/rigidBodyDynamics/spring: Updated comment 2016-04-12 16:37:26 +01:00
ab6fcff621 applications/test/rigidBodyDynamics/spring: Correct typo 2016-04-12 16:16:30 +01:00
9e24a9b5e2 rigidBodyDynamics: Simplified the interface to the solvers 2016-04-12 12:57:31 +01:00
c07bc87f95 rigidBodyDynamics/rigidBodySolvers: Added run-time selectable solvers to integrate the rigid-body motion
Currently supported solvers: symplectic, Newmark, CrankNicolson

The symplectic solver should only be used if iteration over the forces
and body-motion is not required.  Newmark and CrankNicolson both require
iteration to provide 2nd-order behavior.

See applications/test/rigidBodyDynamics/spring for an example of the
application of the Newmark solver.

This development is sponsored by Carnegie Wave Energy Ltd.
2016-04-12 11:33:20 +01:00
81eec80d5d rigidBodyDynamics/rigidBodyModelState: New class to hold the motion state of the rigid-body model
This is a more convenient way of maintaining the state or multiple
states (for higher-order integration), storing, retrieving and passing
between processors.
2016-04-11 19:01:16 +01:00
1177554029 rigidBodyDynamics/restraints: Complete dictionary IO 2016-04-11 11:45:51 +01:00
c019071604 rigidBodyDynamics: Added support for restraints and a linear spring with damper
applications/test/rigidBodyDynamics/spring: Test of the linear spring with damper restraint
Damped simple harmonic motion of a weight on a spring is simulated and
the results compared with analytical solution

    Test-spring
    gnuplot spring.gnuplot
    evince spring.eps

This development is sponsored by Carnegie Wave Energy Ltd.
2016-04-10 23:12:07 +01:00
7d757a7960 applications/test/rigidBodyDynamics/pendulum: Cleanup 2016-04-10 23:07:23 +01:00
48427f7a4e applications/test/rigidBodyDynamics/pendulum/pendulum: Corrected joint type 2016-04-08 18:03:51 +01:00
8df5ca61d2 rigidBodyDynamics/bodies/jointBody: Special body to support elements of composite joints 2016-04-08 17:16:01 +01:00
0c48b153de rigidBodyModel: Added operator<<(Ostream&, const rigidBodyModel&) 2016-04-08 17:02:02 +01:00
33a97bb848 rigidBodyDynamics: Simplified the IO of bodies 2016-04-08 16:56:48 +01:00
b701ec9f3d rigidBodyDynamics/bodies: Complete set of clone functions to support copy construction and assignment 2016-04-07 23:04:17 +01:00
8ffd700ca6 rigidBodyDynamics: Added dictionary-based IO of the rigidBodyModel 2016-04-07 21:47:08 +01:00
fda9aadb3a Specialized dotInterpolate for the efficient calculation of flux fields
e.g. (fvc::interpolate(HbyA) & mesh.Sf()) -> fvc::flux(HbyA)

This removes the need to create an intermediate face-vector field when
computing fluxes which is more efficient, reduces the peak storage and
improved cache coherency in addition to providing a simpler and cleaner
API.
2016-04-06 20:20:53 +01:00
19a93cc696 applications/test/rigidBodyDynamics/pendulum: Simplified using sphere constructor and body lookup by name 2016-04-04 17:08:20 +01:00
09ba40bf26 Updated header 2016-04-04 13:53:51 +01:00
3358c056e6 surfaceMeshConvert: Reinstated missing error messages 2016-04-04 13:53:20 +01:00
736c47d4dc applications/test/rigidBodyDynamics/pendulum: Add a test for merging bodies 2016-04-04 09:26:37 +01:00
94e9b05edd applications/.*/Allwmake: Updated to support "stop on 1st error"
Patch contributed by Bruno Santos
Resolved bug-report http://www.openfoam.org/mantisbt/view.php?id=2042
2016-04-04 09:03:40 +01:00
9891a0ccf9 applications/test/rigidBodyDynamics/pendulum: Very simple test/demonstration of the rigidBodyDynamics library
Simple swinging pendulum simulation with 1-DoF.  The motion is integrated
    using a symplectic method for just over 2-periods.
2016-04-03 22:17:10 +01:00
ac71f86574 UList: Rationalize assignment (shallow-copy vs deep-copy)
//- Disallow default shallow-copy assignment
    //
    //  Assignment of UList<T> may need to be either shallow (copy pointer)
    //  or deep (copy elements) depending on context or the particular type
    //  of list derived from UList and it is confusing and prone to error
    //  for the default assignment to be either.  The solution is to
    //  disallow default assignment and provide separate 'shallowCopy' and
    //  'deepCopy' member functions.
    void operator=(const UList<T>&) = delete;

    //- Copy the pointer held by the given UList.
    inline void shallowCopy(const UList<T>&);

    //- Copy elements of the given UList.
    void deepCopy(const UList<T>&);
2016-04-03 10:26:05 +01:00
06f7682413 applications/test/Matrix/Test-Matrix.C: Corrected typo 2016-04-02 23:28:03 +01:00
56668b2406 Pstream: optimisation of data exchange
Contributed by Mattijs Janssens.

1. Any non-blocking data exchange needs to know in advance the sizes to
   receive so it can size the buffer.  For "halo" exchanges this is not
   a problem since the sizes are known in advance but or all other data
   exchanges these sizes need to be exchanged in advance.

   This was previously done by having all processors send the sizes of data to
   send to the master and send it back such that all processors
   - had the same information
   - all could work out who was sending what to where and hence what needed to
     be received.

   This is now changed such that we only send the size to the
   destination processor (instead of to all as previously). This means
   that
   - the list of sizes to send is now of size nProcs v.s. nProcs*nProcs before
   - we cut out the route to the master and back by using a native MPI
     call

   It causes a small change to the API of exchange and PstreamBuffers -
   they now return the sizes of the local buffers only (a labelList) and
   not the sizes of the buffers on all processors (labelListList)

2. Reversing the order of the way in which the sending is done when
   scattering information from the master processor to the other
   processors. This is done in a tree like fashion. Each processor has a
   set of processors to receive from/ send to. When receiving it will
   first receive from the processors with the least amount of
   sub-processors (i.e. the ones which return first). When sending it
   needs to do the opposite: start sending to the processor with the
   most amount of sub-tree since this is the critical path.
2016-04-02 18:32:11 +01:00
ff8e666099 LLTMatrix, LUscalarMatrix, QRMatrix: Provided consistent 'solve' interface 2016-03-24 19:13:04 +00:00
523b01c1b2 QRMatrix: New class to provide QR-decomposition by Householder reflection
This development is sponsored by Carnegie Wave Energy Ltd.
2016-03-24 14:49:25 +00:00
ddbd5f3d11 LLTMatrix: New matrix form to support Cholesky decomposition
of symmetric positive-definite matrices and the solution of associated
linear systems.
2016-03-23 15:33:03 +00:00
fa8929df6d Use Zero rather than pTraits<Type>::zero unless a static typed '0' is required 2016-03-22 17:46:52 +00:00
44c73bfbe1 Made all template declarations consistent using 'class' rather than 'typename' 2016-03-22 15:02:55 +00:00
055a113f10 SquareMatrix, SymmetricSquareMatrix: Changed the constructor from size to require only n
This avoids the need to check that the m and n dimensions are the same.
2016-03-22 14:13:48 +00:00
64d256f79e etc/config.sh/CGAL: updated
Patch contributed by Bruno Santos:
 - "etc/config.sh/CGAL":
   - Indented the contents of the recently added if block.
   - Added comment about using system versions.
   - Library paths are now only added if the respective version is not "boost-system" and "cgal-system".

 - "src/renumber/Allwmake":
   It now relies on the previous file to get the version for
   Boost (the same way as in "makeCGAL"). This is so that it will also
   build "SloanRenumber" if "boost_version" is set to "boost-system".

 - "applications/utilities/mesh/generation/Allwmake":
   It now also relies on the script "config.sh/CGAL" to get the
   version for CGAL. If "cgal_version" is set to "cgal-system", it
   will now also build "foamy*Mesh" utilities and respective
   libraries.

Resolves report http://www.openfoam.org/mantisbt/view.php?id=1232
2016-03-22 07:58:38 +00:00
71da87b11f Test-Matrix: Removed timing test 2016-03-20 19:50:23 +00:00