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

codeStream - Break with constant torque: OFv2206

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 4, 2024, 17:52
Default codeStream - Break with constant torque: OFv2206
  #1
New Member
 
rubenparedes's Avatar
 
Ruben Paredes
Join Date: Mar 2009
Location: Guayaquil, Ecuador
Posts: 22
Rep Power: 18
rubenparedes is on a distinguished road
Send a message via MSN to rubenparedes
Hi,

I am simulating a marine turbine rotating due to incoming flow. I am trying to implement a break that applies a constant torque on a shaft using codeStream as a rigidBodyMotion restraint within a dynamicMeshDict. The sign of the torque depends only on the direction of rotation.

I tried to follow some codeStream examples without success.

Code:
restraints
{
    breakTorque
    {
        type        externalForce;
        
        body        Turbine;
        location    (1.0 0 0.11432977);
        
        force         #codeStream
        {
            codeInclude
            #{
//                #include "rigidBodyState.H"
                #include "rigidBodyMotion.H"
//                #include "rigidBodyMeshMotion.H"
            #};
            
            codeOptions
            #{
                -I$(LIB_SRC)/rigidBodyDynamics/lnInclude \
//                -I$(LIB_SRC)/rigidBodyMeshMotion/lnInclude
            #};

            codeLibs
            #{

                -lrigidBodyDynamics
 //               -lrigidBodyMeshMotion
            #};

            code
            #{                
               scalar omega = vCofR.w(v(0,Zero))[2]
               torque = 16.0 
                
                if (omega < 0)
                {
                    os  << (0 torque 0.0)
                }
                else
                {	
                    os  << (0 -torque 0.0)
                }
             #};
        };        
    }
}

Any suggestion will be appreciated.

Ruben
__________________
R.
rubenparedes is offline   Reply With Quote

Old   January 1, 2025, 21:22
Default
  #2
New Member
 
Join Date: May 2016
Posts: 2
Rep Power: 0
leecx is on a distinguished road
Hi Ruben. I am facing the same problem. Did you mange to solve this?
leecx is offline   Reply With Quote

Old   January 2, 2025, 09:11
Default
  #3
New Member
 
rubenparedes's Avatar
 
Ruben Paredes
Join Date: Mar 2009
Location: Guayaquil, Ecuador
Posts: 22
Rep Power: 18
rubenparedes is on a distinguished road
Send a message via MSN to rubenparedes
It seems like I need to implement a new restraint for this. However, I haven't try it.
__________________
R.
rubenparedes 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
Chemical properties that are used in Fluent kimej FLUENT 4 August 19, 2011 11:29
How to install CGNS under windows xp? lzgwhy Main CFD Forum 1 January 11, 2011 18:44
CGNS lib and Fortran compiler manaliac Main CFD Forum 2 November 29, 2010 06:25
Really big problems when creating own materials da Jop FLUENT 0 June 28, 2007 11:15
net torque Mangnan CFX 3 June 2, 2004 14:00


All times are GMT -4. The time now is 06:33.