Orcaflex python dynamicsprogress
Post-processing actions can be quite time consuming. Of course, modelDirectory could be obtained by simple text processing of modelFileName, but we provide modelDirectory for the sake of convenience. The modelDirectory attribute is simply the name of the directory that contains modelFileName. For example you might simply change the file extension from. You would typically use modelFileName to create the file name for any output files that your post-processing script saves. Note that the simulation file is yet to be saved. The modelFileName attribute contains the absolute path of the simulation file. The other attributes, modelDirectory and modelFileName, provide information about the file on which the analysis was performed. The params attribute is a string containing the Parameters text specified on the data form. Through this object you can perform your post-processing in exactly the same way as with a standalone Python script. The model attribute is an instance of the Model class defined in the OrcFxAPI module. The info object defines the following attributes: model, params, modelDirectory and modelFileName. The single parameter that is received by the Execute function can be named whatever you like: for the sake of discussion, we adopt the convention of naming it info. Control returns to OrcaFlex which then saves the simulation file.The action's specified script is imported.The embedded Python engine is loaded into the process.The OrcaFlex analysis, either statics or dynamics, is performed.The sequence of events that are carried out around the action's execution is as follows: The script must define a function named Execute which receives a single parameter. The action is specified by a Python script containing Python code. In fact an in-process Python action is executed before the simulation file is saved. This is in contrast to the command script actions which need to start separate processes to execute the script, and then load the model and simulation file into memory.
The benefit of using an in-process execution model is that the script has direct access to the same model that OrcaFlex used to perform the analysis. The script is run inside the OrcaFlex process, by an embedded Python interpreter. This action type takes advantage of the Python interface to OrcaFlex. There are two types of post calculation action: in-process Python actions and command script actions. Note that post calculation actions are not executed automatically when an analysis is performed interactively in OrcaFlex. Post calculation actions can also be invoked from the OrcaFlex programming interface, and interactively from the calculation menu for debugging purposes. Post calculation actions are executed when you perform a calculation using batch mode or Distributed OrcaFlex (requires version 5 or later). The actions can be executed after a static analysis is completed or after a dynamic analysis is completed. Post calculation actions meet that need.Ī model can define one or more post calculation actions. However, if you do not use the OrcaFlex spreadsheet for post-processing, then you need a different mechanism to integrate your post-processing. So, if your post-processing uses the OrcaFlex spreadsheet then it can be integrated into your automation process. The post-processing will then be performed after all the simulation files have been generated. If the post-processing is performed using the OrcaFlex spreadsheet, then the spreadsheet can also be added to the list of batch form jobs. This can also be a time consuming task and it is very desirable that it be automated. The next step is to post-process the simulations to extract the desired results. The input data files are added to the batch form, and then OrcaFlex performs the simulations using as many processors are available on the machine. This is typically used to run large numbers of dynamic simulations. The data are described below and are specified on the general data form.įor example, consider the batch processing capability. Post calculation actions provide a means to include post-processing as part of your wider OrcaFlex automation process.