CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

basic question regarding transform in rigidBodyMotionCoeffs

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 14, 2025, 07:01
Default basic question regarding transform in rigidBodyMotionCoeffs
  #1
zog
New Member
 
Jacques
Join Date: Jul 2019
Posts: 20
Rep Power: 7
zog is on a distinguished road
I am struggling to find the .H / .C files where the "transform" is used.

Code:
FoamFile
{
    format      ascii;
    class       dictionary;
    object      dynamicMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

mover
{
    type            motionSolver;

    libs            ("librigidBodyMeshMotion.so");

    motionSolver       rigidBodyMotion;

    rigidBodyMotionCoeffs
    {   
        report          on;

        solver
        {
            type Newmark;
        }

        accelerationRelaxation 0.7;

        bodies
        {
            floatingObject
            {
                type            cuboid;
                parent          root;

                // Cuboid dimensions
                L               (0.1 0.1 0.1);

                // Density of the cuboid
                rho             800;

                // Cuboid mass
                mass            #calc "$rho*cmptProduct($<vector>L)";
                centreOfMass    (0 0.08 0.08);
                transform      (1 0 0 0 1 0 0 0 1) (0.4 0.45 0.35);
How should I proceed to find it (I tried banana but in this case it didn't help, and searching the API neither), for future reference ?

I got that it corresponds to the centre of rotation (geometrical centre of the floating object), and that it enables to place the centreofmass (given in local coordinates with 0 0 0 the centre of rotation) in the global coordinates system, but I really can't find the actual files where this is done in the C++ reference guide...
zog is offline   Reply With Quote

Old   March 21, 2025, 05:09
Default
  #2
Member
 
Amirhossein Taran
Join Date: Sep 2016
Location: Dublin, Ireland
Posts: 63
Rep Power: 10
amirhosseintaran is on a distinguished road
Quote:
Originally Posted by zog View Post
I am struggling to find the .H / .C files where the "transform" is used.

Code:
FoamFile
{
    format      ascii;
    class       dictionary;
    object      dynamicMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

mover
{
    type            motionSolver;

    libs            ("librigidBodyMeshMotion.so");

    motionSolver       rigidBodyMotion;

    rigidBodyMotionCoeffs
    {   
        report          on;

        solver
        {
            type Newmark;
        }

        accelerationRelaxation 0.7;

        bodies
        {
            floatingObject
            {
                type            cuboid;
                parent          root;

                // Cuboid dimensions
                L               (0.1 0.1 0.1);

                // Density of the cuboid
                rho             800;

                // Cuboid mass
                mass            #calc "$rho*cmptProduct($<vector>L)";
                centreOfMass    (0 0.08 0.08);
                transform      (1 0 0 0 1 0 0 0 1) (0.4 0.45 0.35);
How should I proceed to find it (I tried banana but in this case it didn't help, and searching the API neither), for future reference ?

I got that it corresponds to the centre of rotation (geometrical centre of the floating object), and that it enables to place the centreofmass (given in local coordinates with 0 0 0 the centre of rotation) in the global coordinates system, but I really can't find the actual files where this is done in the C++ reference guide...
I think the good starting point for this would be the rigidBody library itself.

Particularly in your case, within
PHP Code:
$FOAM_SRC 
I can see there is a

PHP Code:
rigidBodyDynamics 
So if I look for "transform" here, I would be able to get the definition/declaration of transform.

PHP Code:
grep -nr "transform" 
then one of the outputs would be:

PHP Code:
./rigidBodyModel/rigidBodyModel.C:201:                bodyDict.get<spatialTransform>("transform"), 
Hope this helps.
amirhosseintaran is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Basic question about iteration process aerosayan Main CFD Forum 7 December 20, 2020 21:53
Basic question about local timestepping aerosayan Main CFD Forum 3 December 20, 2020 08:19
[Other] very basic question about createPhi.H feldy77 OpenFOAM Meshing & Mesh Conversion 2 November 22, 2011 08:16
Basic question forsumit OpenFOAM 0 April 7, 2010 10:46
Basic Question Abhi FLUENT 1 August 4, 2007 08:07


All times are GMT -4. The time now is 21:27.