Batch-File via Python

Hello,

first of all, I didn’t find any threads regarding my question, so excuse me if this has already been postet somewhere. Regarding my post:

I’m currently in the research phase for my Master-Thesis and my task is to analyze fabric membrane which has significantly differeing local stress ratios and I’m tasked with trying to validate the experimental solutions with a FE-Model based solution. For this I should run SOFiSTiK with a batch-file which adapts the material properties during the calculation, if I understood correctly.

My question therefore is, does anybody have any experiences in this area and is it possible to create a batch file with Python? Since I’ve the most experience in Python it would be a good starting point if I don’t have to learn another programming language.

Thanks in advance and with kind regards.

Basically what (I think) you will be trying to do is:

  1. Create text files with sofistik input (cadinp)
  2. Starting sofistik via a function call (command line)
  3. Repeating the above in a loop

You should get familiar with using sofistik via teddy to accomplish task 1 (look in file/examples in teddy)

Task 2: Executing teddy (.dat) files via call is no harder than using: (see basics manual chapter 10 for some extra features)

sps.exe filename

Whether you do this from command line/batch file/python doesn’t matter. Pick your poison.

Task 3: Looping as well can be done in sofistik/python/batch. Your choice

You could of course do all of this in cadinp (teddy) as well once you learn:

  1. To copy/delete/move databases (+SYS copy/del/move)
  2. Change which cdb is used for calculation (#define project=my_cdb)
    See chapter 9 in the basics manual for more on define (basically a preprocesser if your familiar with c/c++ or something similar)

Good luck