Sofiload, copy loadcases

Hello,

Is it possible to assign via Teddy the same original action type to a loadcase when copying it from another database?
Now I use this loop to copy loadcases with an offset,

+PROG SOFILOAD urs:48.1 $ Text Input for Loads
HEAD Loads from other databases in separate loadcase numbers

sto#CDB_Orig “path source db”
sto#LC_StartBron 1
sto#LC_EindBron 10 $ Empty loadcases are simply ignored, without warning
sto#LC_Offset 10
let#i #LC_EindBron-#LC_StartBron+1
let#1 0
let#Help #LC_StartBron+#LC_Offset+#i

prt#CDB_Orig
prt#LC_StartBron
prt#Help

let#1 0 $initialisation loop variable
loop #i
Lc #LC_StartBron+#LC_Offset+#1
copy proj #CDB_Orig NO #LC_StartBron+#1 fact 1 type ALL
Let#1 #1+1
endloop

$Remove variables from CDB
del#CDB_Orig
del#LC_StartBron
del#LC_EindBron
del#LC_Offset

END

How should code be adapted?

Thank you,

Better version, that reads actiontype and name from database to define copied loads.
Still has problems:
loads on elements or placed on elements with same ID in other model… Instead of respecting their position. Does anyone know what is best way to deal with this?

prog template urs:36
$ Variables
sto#CDB_Orig “.cdb-path”
sto#LC_StartBron 2
sto#LC_EindBron 4
sto#LC_Offset 20
sto#i #LC_EindBron-#LC_StartBron+1

@cdb #CDB_Orig
head Get Action and Name of loadcases out of CDB_Orig
txb Loadcase Name
let#CDB_IER 0
let#lf #LC_StartBron
loop #i
@key lc_ctrl #lf
if #CDB_IER<2
sto#ityp(#lf) LIT(@ityp) $Action
sto#rtex(#lf) LIT(@rtex) $Name
txb #(#lf,6.0) #rtex(#lf) #ityp(#lf)
endif
let#lf #lf+1
endloop
end

PROG SOFILOAD urs:48.1 $ Text Input for Loads
HEAD Loads from CDB_Orig in separate loadcase numbers
$ Loop: Copy of Loadcases
let#1 0 $initialisation loop variable
loop #i
Lc #LC_StartBron+#LC_Offset+#1 type #ityp(#1+#LC_StartBron) titl #rtex(#1+#LC_StartBron)
copy proj #CDB_Orig NO #LC_StartBron+#1 fact 1 type ALL
Let#1 #1+1
endloop

$Remove variables from CDB
del#CDB_Orig
del#LC_StartBron
del#LC_EindBron
del#LC_Offset
del#i
del#ityp
del#rtex

END

Copying from one cdb to another is mostly done in “copy every number no matter what” kind of way.

You should make sure that both cdb’s have the exact same mesh (i.e. elements have same number/shape/position). Generating the model (aqua/sofimshc) and copying the cdb is an easy approach.

In your case it would probably be easier to just use the same text input twice, e.g. a seperate file “loads.dat” that you include in both projects with “#include loads.dat”

1 Like