Parametric modelling workflow

Hi All,

I am modelling a ground supported MAT foundation on SOFiPLUS on which I would like to conduct a parametric study. In detail, I want to create different analysis scenarios, where in each scenario a new model with; different plate/structural area thickness, dimensions and supported load is created and exported to SSD to run the analysis and save them. I would like to automate this process in a nut shell. I wonder if it is possible to achieve such workflow on SOFiPLUS or other graphical processing interfaces? I would appreciate any insight on how to approach my problem since I am quite beginner on SOFiSTiK.

Many thanks,
Ahmed

Really sounds like you should skip the graphical interface and move towards text input (and I’m not biased at all :wink: ).

To get going I would recommend you to:

  1. Create an example project and use easily recognizable values for the items you want to parametrize (e.g. use a thickness of 123 mm rather than 1000 mm; easier to search in text)
  2. Run the project through ssd
  3. Generate teddy code from the cdb using the export to dat tool:
    image
  4. Now you start working in teddy (the dat file)
    Identify the parts you want parametrize (e.g. sofimshc, sofiload)
  5. Find those programs in the dat file and replace numeric values with sto# variables (the ones you want to parametrize)
    In order to understand the code check out the manual (F1 in teddy/ssd) and there are also examples if you open the stand alone teddy editor (easier to understand than the machine generated code)
  6. Add a Prog template in the beginning of the file, where you define variables

If you insist on doing it graphically, I think the rhino interface is your best bet (start with a tutorial).

However you still need to grasp the teddy/cadinp commands that you’re trying to generate with rhino.
With such a simple geometry a graphical interface is just extra steps with little benefit.

2 Likes

Thanks a lot! it worked perfectly. :smiling_face:

Now I wonder if it is possible to create several analysis models with different input scenarios for the geometry and supported loads (i.e. same sofimshc and sofiload records but with changing inputs) using a single Teddy file, and run them in SSD and document their results simultaneously? assigning array of values to the predefined variables in PROG Template, then looping these arrays to retrieve the corresponding parametric values for each model, was the first thing to cross my mind. But I am not sure of the plausibility and applicability of this thought, any idea on how to go around this? :thinking:

Oh, another question! is there any command that allows for the rescaling of the sizes of the created structural elements?

Many thanks,
Ahmed

To “loop” over variants, I suggest:

  1. Copy the code into a single teddy (.dat) file.
    Now that you’ve figured out the text input, you don’t need/want the extra bells and whistles of ssd.
    Also a good habit, since dat files are easier to manipulate from the outside (e.g. python), if you decide to step it up later.
  2. Collect all the variants in the first template program using sto#arrays, e.g. thickness:
    Sto#thick 0.8, 0.7, 0.6
  3. Create a single extra variable for the “current variant” that you than use throughout your code, e.g.:
    Let#i_current 0
    Sto#thick_c #thick(#i_current)
    This is somewhat of an extra step, but it focusses variant control to a single point. Good for the first time and also good if you decide to use other tools later (python, bat scripts, …)
  4. Test run (make sure you haven’t screwed up with copy/paste)
  5. Put the entire script into a block definition and then immediatley include it:
    #Define run_prog
    ... Insert code here
    #EndDef run_prog
    $ the run_prog after #EndDef isn't necessary, but increases readability

    #Include run_prog

    This will basically store all your code in a preprocessor text block (between #Define and #EndDef) and then paste it at the #include.
  6. Step above shouldn’t have changed your code, but you guessed it: test run
  7. Now you add a preprocessor variable above the #include:
    #Define run_prog
    ... Insert code here
    #EndDef run_prog
    $ the run_prog after #EndDef isn't necessary, but increases readability

    #Define i_var=0
    #Include run_prog

    and use it in the first template:
    Let#i_current $(i_var) $ Basically you’re pasting 0 at the place of $(i_var)
  8. Test run
  9. Now you add the following for cdb and report control:
    #Define run_prog
    ... Insert code here

    $The commands below will save the reports in indivdual files
    +Sys copy $(name).plb $(project).plb
    +Sys del $(name).plb


    #EndDef run_prog
    $ the run_prog after #EndDef isn't necessary, but increases readability

    #Define i_var=0
    #Define project=$(name)_$(i_var)
    #Include run_prog

    $(project) is the cdb you are calculating towards and $(name) the name of the file you’re running
  10. Now you can copy/paste the last 3 lines for each variant at the end of the file:
    #Define i_var=0
    #Define project=$(name)_$(i_var)
    #Include run_prog

    #Define i_var=1
    #Define project=$(name)_$(i_var)
    #Include run_prog
    ...
    If you decide to loop through it with e.g. a bat script, you can just define the i_var as an environment variable using SET (if you’re familiar with windows cmd)

Controling element size can be done globally in sofimshc, check out ctrl in the manual