save only a part of time integration

Luca Cavagna_21621
Luca Cavagna_21621 Altair Community Member
edited December 2023 in Community Q&A

I am running motionsolve with a template with 2 or 3 <Simulate> commands. The solver uses sensors to decide when to stop one time-integration. These are dummy time-histo. Only the last time integration is of interest. Is there any way to allow plt and all the output files to chop the time histo and save only the last integration?

Best Answer

  • GTT Adam
    GTT Adam
    Altair Employee
    edited December 2023 Answer ✓

    Hi Luca,

    One method to limit the amount of output data is to set the Print Interval to a large value, and then use a Sensor to change the Print Interval by checking the "New Output Step" option to be the desired step size. This way, the solver will only produce 1 or 2 output steps to the H3D or PLT before the Sensor is triggered. In your case, you could set the Print Interval to be 1 second until the Sensor is triggered, and then update the Print Interval to be 0.001. 

     

    If you only want to limit the output to the H3D, you can do so by navigating to 'Global Simulation Settings >> Output Settings >> H3D >> Write H3D Results Starting At'. This will not limit the PLT outputs however.

     

    Finally, you can use a Template to set the outputs off, run for a few seconds, then turn the outputs back on like so:

    <ResOutput
        mrf_file            = "TRUE"
        abf_file            = "FALSE"
        plt_file            = "FALSE"
        plt_angle           = "YAW_PITCH_ROLL"
        flex_vel_acc_output = "TRUE"
        contact_gra_output  = "TRUE"
    />

    <Simulate
    analysis_type       = "Transient"
    end_time            = "5.0"
    print_interval      = "0.01"
    />

    <ResOutput
        mrf_file            = "TRUE"
        abf_file            = "TRUE"
        plt_file            = "TRUE"
        plt_angle           = "YAW_PITCH_ROLL"
        flex_vel_acc_output = "TRUE"
        contact_gra_output  = "TRUE"
    />

    <Simulate
    analysis_type       = "Transient"
    end_time            = "5.0"
    print_interval      = "0.01"
    />

     When you review the PLT file. it will start at 5 seconds. You can combine this with a Sensor such that the first simulate/transient runs for well beyond the runtime, the Sensor then HALTS to move onto the second simulate/transient, which lines up with near the end of your simulation. 

     

    Hope this helps!

    Adam Reid

Answers

  • GTT Adam
    GTT Adam
    Altair Employee
    edited December 2023 Answer ✓

    Hi Luca,

    One method to limit the amount of output data is to set the Print Interval to a large value, and then use a Sensor to change the Print Interval by checking the "New Output Step" option to be the desired step size. This way, the solver will only produce 1 or 2 output steps to the H3D or PLT before the Sensor is triggered. In your case, you could set the Print Interval to be 1 second until the Sensor is triggered, and then update the Print Interval to be 0.001. 

     

    If you only want to limit the output to the H3D, you can do so by navigating to 'Global Simulation Settings >> Output Settings >> H3D >> Write H3D Results Starting At'. This will not limit the PLT outputs however.

     

    Finally, you can use a Template to set the outputs off, run for a few seconds, then turn the outputs back on like so:

    <ResOutput
        mrf_file            = "TRUE"
        abf_file            = "FALSE"
        plt_file            = "FALSE"
        plt_angle           = "YAW_PITCH_ROLL"
        flex_vel_acc_output = "TRUE"
        contact_gra_output  = "TRUE"
    />

    <Simulate
    analysis_type       = "Transient"
    end_time            = "5.0"
    print_interval      = "0.01"
    />

    <ResOutput
        mrf_file            = "TRUE"
        abf_file            = "TRUE"
        plt_file            = "TRUE"
        plt_angle           = "YAW_PITCH_ROLL"
        flex_vel_acc_output = "TRUE"
        contact_gra_output  = "TRUE"
    />

    <Simulate
    analysis_type       = "Transient"
    end_time            = "5.0"
    print_interval      = "0.01"
    />

     When you review the PLT file. it will start at 5 seconds. You can combine this with a Sensor such that the first simulate/transient runs for well beyond the runtime, the Sensor then HALTS to move onto the second simulate/transient, which lines up with near the end of your simulation. 

     

    Hope this helps!

    Adam Reid

  • Luca Cavagna_21621
    Luca Cavagna_21621 Altair Community Member
    edited December 2023

    WOW. Yes, the first 2 options are what I was using actually, i.e. limiting the h3d and changing the print_interval.

    The 3rd option is really helpful and smart!!! Thanks Adam. Really appreciated

    I think I have to carefully go through the manual to discover these commands :D

     

    EDIT: tried and worked perfectly!!!

  • GTT Adam
    GTT Adam
    Altair Employee
    edited December 2023

    WOW. Yes, the first 2 options are what I was using actually, i.e. limiting the h3d and changing the print_interval.

    The 3rd option is really helpful and smart!!! Thanks Adam. Really appreciated

    I think I have to carefully go through the manual to discover these commands :D

     

    EDIT: tried and worked perfectly!!!

    Hi Luca,

    I'm glad that worked for you. The first two approaches are usually enough but the Template approach can be much more powerful. 

    If you deem this a suitable answer, can you please go ahead and mark the above comment as a solution so others can use that as well?

     

    Thanks,

    Adam Reid

  • Luca Cavagna_21621
    Luca Cavagna_21621 Altair Community Member
    edited December 2023

    Hi Luca,

    I'm glad that worked for you. The first two approaches are usually enough but the Template approach can be much more powerful. 

    If you deem this a suitable answer, can you please go ahead and mark the above comment as a solution so others can use that as well?

     

    Thanks,

    Adam Reid

    Hello Adam, yes the 3rd solution was exactly what I was looking for. 

    I marked it. Thanks a lot.