How to create nam and sur files

how to create nam and sur files

valu h 150
valu w 70
valu li 62
valu r 8
valu th 8
valu spy 20.33
valu aoeli 6
valu aoew 5
valu aoeh 17
valu aoele 437
valu aoeth 1
valu _length 3500
valu -factor -1
valu half 0.5
valu h-th - h th
valu h-th-r - h-th r
valu -th * th -factor
valu r+th + r th
valu w-th - w th
valu w-th-r - w-th r
valu w-th-r-r - w-th-r r
valu li-th - li th
valu li-th-r - li-th r
valu -li-th-r * li-th-r -factor
valu -spy * spy -factor

pnt ! 0 0 0
pnt ! 0 th 0
pnt ! h-th-r th 0
pnt ! h-th-r 0 0
line ! D001 D002 aoeth
line ! D002 D003 aoeh
line ! D003 D004 aoeth
line ! D004 D001 aoeh
GSUR A001 + BLEND + L001 + L002 + L003 + L004
seta A001 s A001
comp A001 d
move A001 tra 0 -th

pnt ! 0 r 0
pnt ! 0 r+th 0
pnt ! r+th 0 0
pnt ! r 0 0
pnt ! 0 0 0
line ! D005 D006 aoeth
line ! D006 D007 D009
line ! D007 D008 aoeth
line ! D008 D005 D009
GSUR A002 + BLEND + L005 + L006 + L007 + L008
seta A002 s A002
comp A002 d

copy A002 A003 mir y

move A003 tra h-th-r th

move A002 tra h-th-r w-th-r-r

line ! D00C D007 aoew
line ! D008 D00D aoew

GSUR A004 + BLEND - L007 - L00D + L00B - L00E

seta L005 l L005

swep L005 A005 tra -li-th-r

move all tra 0 -spy

flip A003

copy all all mir x

merg p all
merg l all

elty all QU4
mesh all

seta esurf e all
seta esurf n all
swep esurf beam tra 0 0 _length aoele

seta node n all
enq node sbound1 rec _ _ 0
enq node sbound2 rec _ _ _length
comp sbound1 d
comp sbound2 d

enq node nbound1 rec 0 -spy 0
enq node nbound2 rec 0 -spy _length

copy nbound1 refnode1 tra 0 spy
copy nbound2 refnode2 tra 0 spy
seta refnode se refnode1 refnode2

send all abq
send sbound1 abq nam
send sbound2 abq nam
send sbound1 abq sur
send sbound2 abq sur
send refnode1 abq nam
send refnode2 abq nam
send sbound2 abq pres 1

prnt se
plot f sbound1
plus f sbound2 r
plus e all
view elem
prnt se refnode
plus na refnode

2 Likes

@dichtstoff You are requested to provide clearer instructions. Anyhow, thanks for replying.

1 Like

The canonical way to create those files is using CGX (the CCX standard preprocessor). Other way would be using some other preprocessor as Salome, Prepomax or Mecway, and create groups of faces or nodes in your mesh for applying boundary conditions.

1 Like