but the loop of course won’t run without a +prog to run inside, and I can’t run my other programs if I wrap it in eg. a +prog template, so that is not possible either.
First a “definition” template:
+Prog Template
Sto#i 0, 5 $ Start at 0 and do 5 iterations
Sto#i_mesh 0.9, 0.7, 0.5 $ mesh size factor
End
Then your program modules with iter (iter 99 means iterate up tp 99 times):
+Prog sofimshc iter 99
Let#meshsize #i_mesh(#i) $ Using the current mesh size
… insert your code (iter 99 with all prorgrams)
Then you end it with a control template:
+Prog template iter 99
If (#i(0)<#i(1)) $ as long as iteration isn’t done
Sto#i #i+1
Else $ Quit iteration once you have done enough of them
Exit_iteration
Endif
End
I’m not sure if it works with apply though.
If it doesn’t, i would:
Prepare your entire file in teddy (not ssd)
Define mesh size as a parameter (chapter 11.2), i.e. you use $(mesh_size) as your variable
Write a bat script that loops over mesh sizes, defining it as environmental variables (Set mesh_size in bat)
Then call sps.exe with the teddy file in the bat script (sps is the calculation window, but bat version)
@echo off
set list=100 500 2000 5000
FOR %%i in (%list%) DO (
set mesh_size=%%i
"C:\Program Files\SOFiSTiK\2020\SOFiSTiK 2020\sps.exe" "%UserProfile%\OneDrive\SOFiSTiK\Convergence_analysis\file.dat"
)
file.dat:
+prog aqua urs:19.1 $ Materials
NORM DC EN 1992-2004 G 9.8
conc 1 c 40 ec 17500
END
+prog sofimshc urs:19.2 $ Geometry
SYST 2DSN GDIV 200000 GDIR NEGY
CTRL Mesh 1 ; CTRL HMIN $(mesh_size)
UNIT 6
SPT 1 0 0 ; SPT 2 10000 0 ; SPT 3 10000 10000 ; SPT 4 0 10000
SLN 1 1 2 fix pp ; SLN 2 2 3 ; SLN 3 3 4 ; SLN 4 4 1
SAR 1 MNO 1 t 100
SARB TYPE OUT NL 1,2,3,4
END
+prog TALPA urs:19.3 $ Analysis
ccrl opt solv val 4
ECHO CSPL NO
CS 1 TITL 'Meshsize = $(mesh_size)'
CGRP ALL ACT IN
END
+APPLY $(name)_csg.dat
+PROG RESULTS urs:19.6 $ Table results
XLSX NAME "Mesh$(mesh_size).xlsx" WS "Worksheet"
LC NO 1
TXTP SHOW SIGN OVLP AMAX
NODE TYPE UX REPR DLST