- Apr 26, 2016
-
-
Henry Weller authored
This reverts commit 3cfc54ba.
-
Henry Weller authored
-
Henry Weller authored
See also commit 22f4ad32
-
- Apr 25, 2016
-
-
Henry Weller authored
Resolves bug-report http://www.openfoam.org/mantisbt/view.php?id=1938 Because C++ does not support overloading based on the return-type there is a problem defining both const and non-const member functions which are resolved based on the const-ness of the object for which they are called rather than the intent of the programmer declared via the const-ness of the returned type. The issue for the "boundaryField()" member function is that the non-const version increments the event-counter and checks the state of the stored old-time fields in case the returned value is altered whereas the const version has no side-effects and simply returns the reference. If the the non-const function is called within the patch-loop the event-counter may overflow. To resolve this it in necessary to avoid calling the non-const form of "boundaryField()" if the results is not altered and cache the reference outside the patch-loop when mutation of the patch fields is needed. The most straight forward way of resolving this problem is to name the const and non-const forms of the member functions differently e.g. the non-const form could be named: mutableBoundaryField() mutBoundaryField() nonConstBoundaryField() boundaryFieldRef() Given that in C++ a reference is non-const unless specified as const: "T&" vs "const T&" the logical convention would be boundaryFieldRef() boundaryFieldConstRef() and given that the const form which is more commonly used is it could simply be named "boundaryField()" then the logical convention is GeometricBoundaryField& boundaryFieldRef(); inline const GeometricBoundaryField& boundaryField() const; This is also consistent with the new "tmp" class for which non-const access to the stored object is obtained using the ".ref()" member function. This new convention for non-const access to the components of GeometricField will be applied to "dimensionedInternalField()" and "internalField()" in the future, i.e. "dimensionedInternalFieldRef()" and "internalFieldRef()".
-
Henry Weller authored
-
Henry Weller authored
-
- Apr 24, 2016
-
-
Henry Weller authored
-
- Apr 23, 2016
-
-
Henry Weller authored
-
Henry Weller authored
-
Henry Weller authored
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.
-
- Apr 22, 2016
-
-
Henry Weller authored
-
Henry Weller authored
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
-
Henry Weller authored
-
- Apr 21, 2016
-
-
Henry Weller authored
-
Henry Weller authored
-
Henry Weller authored
Resolves bug-report http://www.openfoam.org/mantisbt/view.php?id=2059
-
- Apr 17, 2016
-
-
Henry Weller authored
-
- Apr 16, 2016
-
-
Henry Weller authored
-
Henry Weller authored
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.
-
- Apr 15, 2016
-
-
Henry Weller authored
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.
-
- Apr 12, 2016
-
-
Henry Weller authored
Replaced with 'unitQuaterion()' virtual function to indicate if the joint uses a unit quaternion to represent rotation.
-
Henry Weller authored
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.
-
Henry Weller authored
-
Henry Weller authored
-
Henry Weller authored
-
Henry Weller authored
-
Henry Weller authored
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.
-
- Apr 11, 2016
-
-
Henry Weller authored
This is a more convenient way of maintaining the state or multiple states (for higher-order integration), storing, retrieving and passing between processors.
-
Henry Weller authored
-
- Apr 10, 2016
-
-
Henry Weller authored
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.
-
Henry Weller authored
-
- Apr 08, 2016
-
-
Henry Weller authored
-
Henry Weller authored
-
Henry Weller authored
-
Henry Weller authored
-
- Apr 07, 2016
-
-
Henry Weller authored
rigidBodyDynamics/bodies: Complete set of clone functions to support copy construction and assignment
-
Henry Weller authored
-
- Apr 06, 2016
-
-
Henry Weller authored
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.
-
- Apr 04, 2016
-
-
Henry Weller authored
applications/test/rigidBodyDynamics/pendulum: Simplified using sphere constructor and body lookup by name
-
Henry Weller authored
-