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

repeating linearMotion

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 19, 2019, 13:35
Default repeating linearMotion
  #1
New Member
 
Join Date: Sep 2017
Posts: 12
Rep Power: 9
MNoCeZ is on a distinguished road
Hello together,


i made a simulation of two boxes with same size . Both boxes are connect through the cyclicPeriodicAMI boundary condition. Both boxes have cyclicPeriodic walls in y and z direction. In a next step i adapted the linearMotion function:


Code:
Foam::septernion
Foam::solidBodyMotionFunctions::linearPeriodicMotion::transformation() const
{
    scalar t = time_.value();
    
    scalar linear_displacement =0.0;
    
    if (pitchSpeed_ > 0.0)
    {
        linear_displacement = fmod(pitchSpeed_*t,pitch_);
    }

    if (pitchSpeed_ < 0.0)
    {
        linear_displacement = fmod(pitchSpeed_*t,-pitch_);
    }     
    
    //const vector velocity = (0 pitchSpeed_ 0);
    // Translation of centre of gravity with constant velocity
    vector displacement;
    
    displacement.x()=0.0;
    displacement.y()=linear_displacement;
    displacement.z()=0.0;
    
    quaternion R(1);
    septernion TR(septernion(-displacement)*R);

    DebugInFunction << "Time = " << t << " transformation: " << TR << endl;

    return TR;
}


bool Foam::solidBodyMotionFunctions::linearPeriodicMotion::read
(
    const dictionary& SBMFCoeffs
)
{
    solidBodyMotionFunction::read(SBMFCoeffs);

    //SBMFCoeffs_.lookup("velocity") >> velocity_;
    
    
    SBMFCoeffs_.lookup("pitchSpeed") >> pitchSpeed_;
    SBMFCoeffs_.lookup("pitch") >> pitch_;
    

    return true;
}
the idea is to move the second box with a constant speed pitchSpeed in y direction until the covered distance corresponds to the box size in y direction. The position of the moving box should then be reset and the process repeated. The problem is that after resetting the box the time step becomes very small and unphysical values occur. One way to solve this problem would be to restart the simulation after the box has been resetted. However, this is not very effective. Does anyone have an idea how I could solve the problem more elegantly? I am using v1612+.

Best regards


Mark
MNoCeZ 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
Repeating Geometry Condition Sean95 OpenFOAM Running, Solving & CFD 0 April 10, 2018 10:46
Substitution of repeating geometry to simplify akay ANSYS 0 December 9, 2014 15:34
Cyclic BC for repeating geometries Yeru OpenFOAM Programming & Development 4 July 3, 2014 10:50
Sliding Mesh/ Repeating interface apc3161 STAR-CCM+ 0 September 4, 2009 20:31
Repeating same time steps (FSI). cjtune Siemens 0 February 20, 2003 00:05


All times are GMT -4. The time now is 12:26.