Commit Graph

32 Commits

Author SHA1 Message Date
Mark Olesen
79048eb68f STYLE: use writeEntry(), beginBlock(), endBlock() methods
- use dictionary::get<..> instead of lookup in a few more places
2020-04-28 10:41:23 +02:00
sergio
6e8f0dbe76 INT: org integration
1) rPolynomial Eq of State
2) externalForce and softWall in rigidBodyDynamics

INT: Several minor bug fixes plus
2019-12-17 22:23:00 +00:00
Andrew Heather
fdf8d10ab4 Merge commit 'e9219558d7' into develop-v1906 2019-12-05 11:47:19 +00:00
OpenFOAM bot
e9219558d7 GIT: Header file updates 2019-10-31 14:48:44 +00:00
sergio
d96ad1cd09 ENH: Add components to allow overset with multiple motion solvers
1) Add softWall rigidBody restrain
2) Add linearSpringDamper sixDoF restrain to work as soft rope
3) dynamicMotionSolverListFvMesh changed to dictionary based input
4) Add Time reference access to sixDof restraints
5) Add drivenLinearMotion to solidBodyMotionFunctions.
2019-08-16 11:27:59 -07:00
Mark Olesen
7795adfcb4 ENH: additional PtrList constructor and memory management method
- PtrList::release() method.

  Similar to autoPtr and unique_ptr and clearer in purpose than
  using set(i,nullptr)

- Construct from List of pointers, taking ownership.

  Useful when upgrading code. Eg,

     List<polyPatch*> oldList = ...;
     PtrList<polyPatch> newList(oldList);
     ...

BUG: incorrect resizing method names (PtrDynList) in previously unused code
2019-02-22 15:55:17 +01:00
OpenFOAM bot
154029ddd0 BOT: Cleaned up header files 2019-02-06 12:28:23 +00:00
Mark Olesen
50baac3c45 ENH: construct string types from Istream now explicit (#1033)
- this helps for trapping unguarded dictionary lookups.
2018-11-03 20:24:34 +01:00
Mark Olesen
07dafe7b0b STYLE: use range-for when looping dictionary entries.
- as part of the cleanup of dictionary access methods (c6520033c9)
  made the dictionary class single inheritance from IDLList<entry>.

  This eliminates any ambiguities for iterators and allows
  for simple use of range-for looping.

  Eg,
      for (const entry& e : topDict))
      {
          Info<< "entry:" << e.keyword() << " is dict:" << e.isDict() << nl;
      }

   vs

      forAllConstIter(dictionary, topDict, iter))
      {
          Info<< "entry:" << iter().keyword()
              << " is dict:" << iter().isDict() << nl;
      }
2018-10-19 13:08:24 +02:00
Matej Forman
5b9c4ceae5 ENH: rigidbodyDynamics: prescribed rotation + testcase
See:
src/rigidBodyDynamics/restraints/prescribedRotation
tutorials/multiphase/overInterDyMFoam/boatAndPropeller
2018-04-19 17:54:24 +01:00
Mark Olesen
37e248c74b STYLE: consistent use of wordHashSet instead of HashSet<word>
- the wordHashSet typedef is always available when HashSet has been
  included.

- use default HashTable key (word) instead of explicitly mentioning it
2018-02-22 11:19:47 +01:00
Mark Olesen
038bb40a79 COMP: resolve template qualification and other issues for clang-5.0.1 2018-01-22 15:13:39 +01:00
Mark Olesen
416a3790ea STYLE: prefer autoPtr::reset() to autoPtr::set()
- in most cases already checked valid() so don't need additional check
  for setting an existing pointer
2017-11-22 19:11:11 +01:00
Mark Olesen
c0ba7bf05a STYLE: use Ostream writeEntry when writing key/value entries
- makes for clearer code

ENH: make writeIfDifferent part of Ostream
2017-11-06 00:49:24 +01:00
Henry Weller
8b219feda2 Updated member type comments
See http://bugs.openfoam.org/view.php?id=2356
2016-11-28 09:22:56 +00:00
Henry Weller
58f905ff70 C++11: Replaced the C NULL with the safer C++11 nullptr
Requires gcc version 4.7 or higher
2016-08-05 17:19:38 +01:00
Henry Weller
90f5cc6b9d rigidBodyDynamics: Generalized the interface to the restraints
Now internal forces and restraints may be applied between bodies within
the articulated structure.
2016-04-19 21:58:10 +01:00
Henry Weller
a0170df6c1 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
Henry Weller
315a1baad3 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
Henry Weller
33be0fa564 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
Henry Weller
a108759d3e rigidBodyDynamics/restraints: Added linearDamper 2016-04-11 14:28:09 +01:00
Henry Weller
be567300c3 rigidBodyDynamics/restraints: Complete dictionary IO 2016-04-11 11:45:51 +01:00
Henry Weller
1f51c8a89d 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
Henry Weller
81a6ea0cc9 rigidBodyModel: Add a few more comments 2016-04-08 17:25:17 +01:00
Henry Weller
9ffaed8fd8 rigidBodyDynamics/bodies/jointBody: Special body to support elements of composite joints 2016-04-08 17:16:01 +01:00
Henry Weller
8b6fe62f88 rigidBodyModel: Added operator<<(Ostream&, const rigidBodyModel&) 2016-04-08 17:02:02 +01:00
Henry Weller
93f2f0d41a rigidBodyDynamics: Simplified the IO of bodies 2016-04-08 16:56:48 +01:00
Henry Weller
1ec2507f62 rigidBodyDynamics: Added dictionary-based IO of the rigidBodyModel, bodies and joints
Added support for composite joints including a specialized 6-DoF form for floating bodies.
2016-04-08 16:35:49 +01:00
Henry Weller
0c7ce8938b rigidBodyDynamics: Added dictionary-based IO of the rigidBodyModel 2016-04-07 21:47:08 +01:00
Henry Weller
67c2cbfe4b src/rigidBodyDynamics/bodies: Added write 2016-04-04 22:10:34 +01:00
Henry Weller
071b1fd356 rigidBodyModel: Added support for body lookup by name 2016-04-04 17:06:48 +01:00
Henry Weller
55b457a0ca rigidBodyDynamics: New library providing support for the dynamics of n-DoF articulated bodies
Based on the principles, algorithms, data structures and notation
presented in the book:

    Featherstone, R. (2008).
    Rigid body dynamics algorithms.
    Springer.

This development is sponsored by Carnegie Wave Energy Ltd.
2016-04-03 15:48:59 +01:00