I’m trying to make a convergence analysis of the mesh in a shell model.
I have made the following sample code in which I would like to change the parameter #meshsize and the print the results to a table.
+prog aqua urs:19.1 $ Materials conc 1 c 40 ec 17500 end +prog sofimshc urs:19.2 $ Geometry SYST 2DSN GDIV 200000 GDIR NEGY CTRL Mesh 1 ; CTRL HMIN #meshsize 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 = #meshsize' CGRP ALL ACT IN end +APPLY $(name)_csg.dat +PROG RESULTS urs:19.6 $ Table results XLSX NAME "Mesh#Meshsize.xlsx" WS "Worksheet" LC NO 1 TXTP SHOW SIGN OVLP AMAX NODE TYPE UX REPR DLST END
Ideally I would put it all inside a loop but like this:
let#mesh 100,1000,2500,5000 loop#i 4 let#meshsize #mesh(#i) <MY CODE GOES HERE> endloop
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.
Is there a clever way around this?