There was an error fetching the commit references. Please try again later.
ENH: consolidation of coordinate systems and coordinate rotations (issue #863)
The sole purpose of the coordinateRotation class is now simply to specify a rotation tensor in a consistent and convenient form (eg, two axes, axis-angle, Euler angles etc) with in a runTime-selectable mechanism. All transformations methods have been removed from coordinateRotation entirely. The coordinateSystem class now contains an origin and a base rotation tensor directly and various transformation methods. - The origin represents the "shift" for a local coordinate system. - The base rotation tensor represents the "tilt" or orientation of the local coordinate system in general (eg, for mapping positions), but may require position-dependent tensors when transforming vectors and tensors. For some coordinate systems (currently the cylindrical coordinate system), the rotation tensor required for rotating a vector or tensor is position-dependent. This additional layer of complexity was previously hidden in the cylindrical rotation, but was too inflexible and fragile. The new coordinateSystem and its derivates (cartesian, cylindrical, indirect) now provide a uniform() method to define if the rotation tensor position independent or not. Additional position-dependent transform methods are now supported with the positions either being given as an additional parameter. STYLE: provide a dedicated Foam::coordSystem namespace for categories of coordinate systems (cartesian, cylindrical, indirect) GENERAL NOTE: - These changes to coordinate systems and rotations may represent a breaking change for existing user coding. The coordinate system 'R()' method now returns the rotation directly instead of the coordinateRotation. Old: tensor rot = cs.R().R(); New: tensor rot = cs.R(); Old: cs.R().transform(...); New: cs.transform(...); In some cases when cylindrical coordinates are permissible, position-dependent transformations may be required. Eg, ... = cs.transform(globalPt, someVector); Or even if (cs.uniform()) { ... = cs.transform(someVector); } else { ... = cs.transform(globalPt, someVector); } For operations requiring caching of the coordinate rotations: tensorField rots(cs.R(somePoints)); and later Foam::transformList(rots, someVectors); - harmonized naming of transformations. renamed transformTensor -> transform renamed transformVector -> transformPrincipal - transformPoint and invTransformPoint provide transformations with an origin offset using Cartesian for both local and global points. - support transform/invTransform for common data types (scalar, vector, sphericalTensor, symmTensor, tensor).
Showing
- applications/solvers/heatTransfer/chtMultiRegionFoam/solid/createSolidFields.H 5 additions, 1 deletion...heatTransfer/chtMultiRegionFoam/solid/createSolidFields.H
- applications/solvers/heatTransfer/chtMultiRegionFoam/solid/setRegionSolidFields.H 6 additions, 1 deletion...tTransfer/chtMultiRegionFoam/solid/setRegionSolidFields.H
- applications/test/coordinateSystem/Test-coordinateSystem.C 35 additions, 20 deletionsapplications/test/coordinateSystem/Test-coordinateSystem.C
- applications/utilities/surface/surfaceMeshConvert/surfaceMeshConvert.C 10 additions, 9 deletions...utilities/surface/surfaceMeshConvert/surfaceMeshConvert.C
- applications/utilities/surface/surfaceMeshExport/surfaceMeshExport.C 8 additions, 6 deletions...s/utilities/surface/surfaceMeshExport/surfaceMeshExport.C
- applications/utilities/surface/surfaceMeshImport/surfaceMeshImport.C 10 additions, 9 deletions...s/utilities/surface/surfaceMeshImport/surfaceMeshImport.C
- src/OpenFOAM/primitives/Tensor/Tensor.H 0 additions, 5 deletionssrc/OpenFOAM/primitives/Tensor/Tensor.H
- src/OpenFOAM/primitives/Tensor/TensorI.H 0 additions, 23 deletionssrc/OpenFOAM/primitives/Tensor/TensorI.H
- src/OpenFOAM/primitives/Tensor2D/Tensor2D.H 0 additions, 5 deletionssrc/OpenFOAM/primitives/Tensor2D/Tensor2D.H
- src/OpenFOAM/primitives/Tensor2D/Tensor2DI.H 0 additions, 17 deletionssrc/OpenFOAM/primitives/Tensor2D/Tensor2DI.H
- src/finiteVolume/cfdTools/general/porosityModel/DarcyForchheimer/DarcyForchheimer.C 14 additions, 29 deletions...general/porosityModel/DarcyForchheimer/DarcyForchheimer.C
- src/finiteVolume/cfdTools/general/porosityModel/fixedCoeff/fixedCoeff.C 13 additions, 28 deletions...me/cfdTools/general/porosityModel/fixedCoeff/fixedCoeff.C
- src/finiteVolume/cfdTools/general/porosityModel/porosityModel/porosityModel.C 1 addition, 1 deletion...Tools/general/porosityModel/porosityModel/porosityModel.C
- src/functionObjects/field/fieldCoordinateSystemTransform/fieldCoordinateSystemTransformTemplates.C 1 addition, 1 deletion...SystemTransform/fieldCoordinateSystemTransformTemplates.C
- src/functionObjects/forces/forces/forces.C 3 additions, 3 deletionssrc/functionObjects/forces/forces/forces.C
- src/functionObjects/forces/forces/forces.H 5 additions, 5 deletionssrc/functionObjects/forces/forces/forces.H
- src/fvOptions/sources/derived/jouleHeatingSource/jouleHeatingSource.C 6 additions, 10 deletions...s/sources/derived/jouleHeatingSource/jouleHeatingSource.C
- src/fvOptions/sources/derived/rotorDiskSource/rotorDiskSource.C 10 additions, 9 deletions...Options/sources/derived/rotorDiskSource/rotorDiskSource.C
- src/fvOptions/sources/derived/rotorDiskSource/rotorDiskSource.H 7 additions, 4 deletions...Options/sources/derived/rotorDiskSource/rotorDiskSource.H
- src/fvOptions/sources/derived/rotorDiskSource/rotorDiskSourceI.H 2 additions, 1 deletion...ptions/sources/derived/rotorDiskSource/rotorDiskSourceI.H
Please register or sign in to comment