Ansys Learning Forum › Forums › Discuss Simulation › General Mechanical › ANSYS APDL – displacement constraints (D commands) in .CBDO file › Reply To: ANSYS APDL – displacement constraints (D commands) in .CBDO file
November 22, 2024 at 2:36 pm
Deepak
Ansys Employee
Hi,
Please refer to this example, I was able to generate a .cbdo file, with NMODIF,DDELE, and D blocks.
!SHELL_MAIN_MODEL
/clear
/FILNAME,Mainmodel
/PREP7
!MATERIAL PROP
MP,EX,1,2E5, ! MPa
MP,NUXY,1,0.3,
! Shell Element
ET,1,181
sectype,1,shell
secdata,4
secoff,mid
!GEOMETRY
K,1,0,0,0
K,2,0,0,10
K,3,20,0,10
K,4,20,0,0
A,1,2,3,4
!MESHING
MSHAPE,0,2D
CM,_Y,AREA
ASEL, , , ,1
CM,_Y1,AREA
CHKMSH,’AREA’
CMSEL,S,_Y
AMESH,_Y1
!SUPPORTS
NSEL,S,LOC,X,0
D,ALL,ALL
ALLSEL,
NSEL,S,LOC,X,20,
F,ALL,FX,1E5
F,ALL,FY,0
F,ALL,FZ,0
ALLSEL
FINISH
/SOL
SOLVE,
FINISH
SAVE
!********************************
!****SHELL_TO_SOLID_SUB_MODEL****
!********************************
/CLEAR
/FILNAME,Submodel
/PREP7
ET,1,SOLID185
MP,EX,1,2E5, ! MPa
MP,NUXY,1,0.3,
!Sub_model GEOMETRY
BLOCK,0,10,-2,2,0,8,
MSHAPE,1,3D
MSHKEY,0
CM,_Y,VOLU
VSEL, , , ,1
CM,_Y1,VOLU
CHKMSH,’VOLU’
CMSEL,S,_Y
VSWEEP,_Y1
CMDELE,_Y
CMDELE,_Y1
CMDELE,_Y2
!NROTAT
NSEL,S,LOC,X,10
NSEL,A,LOC,Z,8
NROTAT,ALL,
ALLSEL,ALL
!NWRTIE
NSEL,S,LOC,X,10
NSEL,A,LOC,Z,8
NWRITE,
ALLSEL,ALL
FINISH
SAVE
!Resume of Mainmodel
RESUME,Mainmodel,DB
/POST1
FILE,’Mainmodel’,’rst’,’.’
SET,LAST
CBDOF,’Submodel’,’node’,’ ‘,,,,0, ,1,
FINISH,
!Resume back to Submodel
RESUME,Submodel,DB
/PREP7 ! The .cbdo file must be read in PREP7
/INPUT,,cbdo ! Reads Jobname.cbdo up to the /EOF command
/INPUT,,cbdo,,:cb1 ! Reads same file from the label :cb1
DCUM,ADD
!SUPPORTS
NSEL,S,LOC,X,0
D,ALL,ALL
ALLSEL,
FINISH
/SOLU
SOLVE
FINISH
/POST1
SET,LAST
PLNSOL,U,X,0,1.0
Thanks,
Deepak