getComputationalTimeFromRealTime

Thermal, Aging, ASR, Creep and more.

getComputationalTimeFromRealTime

Postby rwendner » Fri Aug 05, 2016 8:16 pm

as discussed today with Daniele, it would be helpful for some of our developments if we could convert a given RealTimeValue to a corresponding ComputationalTimeValue using the RealTimeMap in the script.
An example would be converting the StartTime and EndTime for some time-dependent process that are defined in the input file.
rwendner
 
Posts: 154
Joined: Wed Jul 15, 2015 4:35 pm

Re: getComputationalTimeFromRealTime

Postby peless1d » Wed Aug 10, 2016 7:58 pm

The functionality you requested has been implemented in MARS version 2016.8.12. Let's say you enter a curve like this

    LoadCurve RealTime {
    X-Units time ms // computation time
    Y-Units time days // real time
    ReadPairs 3
    0. 0.
    1. 10.
    2. 50.
    }

and inside the code you want to find the computation time at 30 days. This is the coding you need to insert

    double ctm, rtm;
    rtm = 30.; // days
    uc->convertTime(rtm, "days");
    ctm = prm->interpComputationTimeFromRealTime(rtm);
    cout << "ctm = " << ctm << endl;

This will print
    ctm = 0.0015
where 0.0015 is the time in seconds, since the calculational time units are seconds.
peless1d
 
Posts: 4
Joined: Thu Apr 21, 2016 11:38 pm

Re: getComputationalTimeFromRealTime

Postby rwendner » Thu Aug 11, 2016 3:44 pm

thank you !
this code segment is already introduced into the prestressing subroutine.
rwendner
 
Posts: 154
Joined: Wed Jul 15, 2015 4:35 pm


Return to Multiphysics LDPM (M-LDPM)

Who is online

Users browsing this forum: No registered users and 1 guest

cron