Hello Enrique,
thank you for your reply. However the situation is a little bit more complex than that. My condition is a pressure over face:
Code: Select all
NUMBER: 7 CONDITION: Surface-Load
CONDTYPE: over surfaces
CONDMESHTYPE: over face elems
QUESTION: Components:#CB#(GLOBAL,LOCAL)
VALUE: GLOBAL
DEPENDENCIES: (GLOBAL,HIDE,N_pressure,#CURRENT#, \
RESTORE,X_pressure,#CURRENT#, \
RESTORE,Y_pressure,#CURRENT#, \
RESTORE,Z_pressure,#CURRENT#, \
HIDE,Radial_pressure,#CURRENT#, \
HIDE,Theta_pressure,#CURRENT#)
DEPENDENCIES: (LOCAL,RESTORE,N_pressure,#CURRENT#, \
HIDE,X_pressure,#CURRENT#, \
HIDE,Y_pressure,#CURRENT#, \
HIDE,Z_pressure,#CURRENT#, \
HIDE,Radial_pressure,#CURRENT#, \
HIDE,Theta_pressure,#CURRENT#)
DEPENDENCIES: (LOCAL,HIDE,N_pressure,#CURRENT#, \
HIDE,X_pressure,#CURRENT#, \
HIDE,Y_pressure,#CURRENT#, \
RESTORE,Z_pressure,#CURRENT#, \
RESTORE,Radial_pressure,#CURRENT#, \
RESTORE,Theta_pressure,#CURRENT#)
QUESTION: X_pressure
VALUE: 0.0
QUESTION: Y_pressure
VALUE: 0.0
QUESTION: Radial_pressure
VALUE: 0.0
QUESTION: Theta_pressure
VALUE: 0.0
QUESTION: Z_pressure
VALUE: 0.0
QUESTION: N_pressure
VALUE: 0.0
END CONDITION
Then, in the "Global" and "Local" case the face of the element is required from the software point of view. Now I want to add a cylindrical force (to be transformed in FX and FY):
Code: Select all
*#---------------------------------------------------------------SURFACE-LOAD
*Set elems(all)
*if(ndime==2)
*Set Cond Face-Load *elems *CanRepeat
*else
*Set Cond SurFace-Load *elems *CanRepeat
*endif
*intformat "%8i"
*if(CondNumEntities>0)
FACE_LOAD
*#
*if(ndime==2)
*#
*loop elems *OnlyInCond
ELEM=*elemsnum() NODES=*globalnodes
*if(strcmp(cond(1),"GLOBAL")==0)
*if(QUADRAT==1)
GLOBAL: FX=*cond(2) FY=*cond(3) /
FX=*cond(2) FY=*cond(3) /
FX=*cond(2) FY=*cond(3)
*else
GLOBAL: FX=*cond(2) FY=*cond(3) /
FX=*cond(2) FY=*cond(3)
*endif
*elseif(strcmp(cond(1),"LOCAL")==0)
*if(QUADRAT==1)
LOCAL: FX=*cond(2) FY=*cond(4) /
FX=*cond(2) FY=*cond(4) /
FX=*cond(2) FY=*cond(4)
*else
LOCAL: FX=*cond(2) FY=*cond(4) /
FX=*cond(2) FY=*cond(4)
*endif
*elseif(strcmp(cond(1),"CYLINDRICAL")==0)
$ CYLINDRICAL
*Set var pi=4*atan(1.0)
*Set var myradius=Operation(sqrt(pow(NodesCoord(1),2)+pow(NodesCoord(2),2)))
*if(NodesCoord(1)==0.0)
*Set var theangle=Operation(pi/2.0)
*else
*Set var theangle=Operation(atan(NodesCoord(2)/NodesCoord(1)))
*endif
*if(sin(theangle)>=0.0)
*Set var mySin=Operation(1.0)
*else
*Set var mySin=Operation(-1.0)
*endif
*if(cos(theangle)>=0.0)
*Set var myCos=Operation(1.0)
*else
*Set var myCos=Operation(-1.0)
*endif
*Set var forcerad=Operation(cond(4,real))
*Set var forcetht=Operation(cond(5,real))
*Set var forcex1=Operation(forcerad*cos(theangle))
*Set var forcex2=Operation((-mySin*myradius*tan(forcetht)*sin(theangle)))
*Set var forcey1=Operation(forcerad*sin(theangle))
*Set var forcey2=Operation((+myCos*myradius*tan(forcetht)*cos(theangle)))
*if(QUADRAT==1)
GLOBAL: FX=*Operation(forcex1+forcex2) FY=*Operation(forcey1+forcey2) /
FX=*Operation(forcex1+forcex2) FY=*Operation(forcey1+forcey2) /
FX=*Operation(forcex1+forcex2) FY=*Operation(forcey1+forcey2)
*else
GLOBAL: FX=*Operation(forcex1+forcex2) FY=*Operation(forcey1+forcey2) /
FX=*Operation(forcex1+forcex2) FY=*Operation(forcey1+forcey2)
*endif
*endif
*end
The part of the script after $CILINDRICAL is changing from cylindrical to FX and FY. The final format of a loaded face is (in this case it was a square face):
Code: Select all
FACE_LOAD
ELEM= 39 NODES= 3356 3359 3360 3357
GLOBAL: FX=0.0 FY=1.0 FZ=0.0 /
FX=0.0 FY=1.0 FZ=0.0 /
FX=0.0 FY=1.0 FZ=0.0 /
FX=0.0 FY=1.0 FZ=0.0
What I would like to do is to change the value in FX, FY, FZ to reflect the cylindrical force that is applied. Is it possible?