## General Mechanical

#### Implement a moving pressure load (circle area) in Ansys WB via APDL command

• HollyFart
Subscriber

Hello, I try to implement a moving pressure load with a circle shaped area, which is moving along the Y direction
I failed to take the circle equation into account regarding the apdl script
Is it possible to implement the mentioned restrictions?

• Rohith Patchigolla
Ansys Employee

Hi Hollyfart,

Is the pressure within the circle constant (i.e. F/A) or varying based on the X and Y coordinates (i.e. according to the function) based on a co-ordinate system located at the center of circle? Let us ignore the time factor for now.

Best regards,

Rohith

• HollyFart
Subscriber

Hi rgpatchi,

the pressure within the circle area should be uniform.

It’s simple P=F/A and not dependant on X and Y coordinates.

Best regards

HF

• Rohith Patchigolla
Ansys Employee

Hello Holly,

In that case, function approach is not feasible.

Try the below steps:

0. Create SURF154 elements on the face where you would like to apply this pressure.

1. Divide your simulation into number of load steps, say 10 (more number of load steps --> more resolution of the moving pressure load)

• Create a local cylindrical co-ordinate system at a center of the current circles position.

• select the SURF154 elements and nodes attached to these elements

• Re-elect nodes in the created cyl co-ordinate system within radius of the circle, using X co-ordinate (radial)

• Re-select SURF154 elements attached to the selected nodes

• Apply Pressure value (calculated based on your equation) to the selected elements

• Go to next load step

I have pasted a simple script for step 2, you can use for this purpose (to demonstrate the steps - please customize according to your need).

`wpcs,-1,0		! WP @ GLOBAL ORIGINwpof,,6			! OFFSET WP ALONG ITS Y AXIS (i.e. provide current position of center of circle along Y axis)cswp,11,1		! DEFINE Cylindrical COORDINATE SYSTEM @ WP ORIGINesel,s,ename,,154       ! Select SURF154 elements sfed,all,,pres          ! Delete old pressures if anynsle                    ! Select nodes attached to selected SURF elementsnsel,r,loc,x,0,3        ! Select nodes within radius of circle, say 3 mmcsys,0                  ! Set CSYS back to globalesln,r                  ! Select SURF elements attached to the nodes within the circlesfe,all,,pres,,1        ! Apply pressure based on your calculation at the said time. You can automate this by some more commandsallsel,alloutres,all,all`

Hope this helps.

Please let me know if you have any other questions.

Best regards,

Rohith

• HollyFart
Subscriber

Hallo Rohith,

thank you very much for your solution post.

It’s really helpful!, but I’m not really sure how to implement SURF154 Elements on the part surface.

Can it be done by defining named component or should I use an APDL snippet to achieve this?

Like:

et,matid,154

Best regards,

HF

• Rohith Patchigolla
Ansys Employee

Hi Holly,

Are you using Workbench or ANSYS Classic?

Best regards,

Rohith

• HollyFart
Subscriber

Hi Rohith,

I use Ansys Workbench 16 and I'm quite familiar with the use of APDL command snippets.

Best regards

HF

• Rohith Patchigolla
Ansys Employee

Hi Holly,

Thanks for the clarification.

You can ofcourse create SURF154 elements on a surface, by selecting nodes of the surface (by selecting the face named selection via CMSEL command) and use ESURF command to create the elements.

But, easier option would be to simply, create a dummy pressure load via GUI in Mechanical on the face, with a very low pressure value, say 1e-8.

This will create the elements for you, and then you can simply select these elements in the script I suggested.

Also, when you have multiple pressure loads in your model, multiple SURF154 (with different type numbers) will be created. So, care is to be taken to select correct set of SURF154 elements via Type number, i.e. ESEL,S,TYPE,, instead of ESEL,S,NAME,,154 as I suggested before.

Hope this helps.

Best regards,

Rohith

• HollyFart
Subscriber

Hi Rohith,

I'm making progress but it's still not working

I’m struggling with the ESURF command

Best regards,

HF.

• Rohith Patchigolla
Ansys Employee

Hi Holly,

Please try below commands in the command object, corresponding only to Step 1.

`/prep7                          ! Enter into /prep7 as ET and ESURF are valid only in /PREP7et,100,154                      ! Create a new element type for SURF154     			cmsel,s,surface1		! Select nodes on a face via Face named selectiontype,100                        ! Set the element type as 100esurf                           ! Create surface effect elements on the selected nodesallsel,all                      ! Select everything back  /solu                           ! Re-enter /SOLU`

Hope this helps.

Best regards,
Rohith

• HollyFart
Subscriber

Hi Rohith,

thank you very much for your help. It’s perfectly working.

Best regards,

HF

• HollyFart
Subscriber

Hi Rohith,

I’m trying to implement the pressure load via do loop.

Something isn’t working, I’m missing something.

The command script is:

total_time = 10                   ! Total simulation time in seconds

time_steps = 100                  ! Total amount of steps

time_inc = total_time/time_steps  ! Time increment in seconds

V_p = 0.01                        ! m/s Load velocity

PV = 1E04                         ! Pa  Load value

X_GESAMT= 0.1                     ! m  Workpiece length

*do,i,1,time_steps,1

nsub,1

time=i*time_inc

wpcs,-1,0               ! WP @ GLOBAL ORIGIN

wpof,,V_p*time          ! OFFSET WP ALONG ITS Y AXIS (i.e. provide current position of center of circle along Y axis)

cswp,11,1               ! DEFINE Cylindrical COORDINATE SYSTEM @ WP ORIGIN

esel,s,ename,,154       ! Select SURF154 elements

sfed,all,,pres          ! Delete old pressures if any

nsle                    ! Select nodes attached to selected SURF elements

csys,0                  ! Set CSYS back to global

esln,r                  ! Select SURF elements attached to the nodes within the circle

sfe,all,,pres,,PV       ! Apply pressure based on your calculation at the said time.

allsel,all

outres,all,all

*if,i,EQ,1,THEN

/prep7                          ! Enter into /prep7 as ET and ESURF are valid only in /PREP7

et,100,154                      ! Create a new element type for SURF154

cmsel,s,surface1                ! Select nodes on a face via Face named selection

type,100                        ! Set the element type as 100

esurf                           ! Create surface effect elements on the selected nodes

allsel,all                      ! Select everything back

/solu

nsub,1

time=i*time_inc

wpcs,-1,0               ! WP @ GLOBAL ORIGIN

wpof,,V_p*time          ! OFFSET WP ALONG ITS Y AXIS (i.e. provide current position of center of circle along Y axis)

cswp,11,1               ! DEFINE Cylindrical COORDINATE SYSTEM @ WP ORIGIN

esel,s,ename,,154       ! Select SURF154 elements

sfed,all,,pres          ! Delete old pressures if any

nsle                    ! Select nodes attached to selected SURF elements

csys,0                  ! Set CSYS back to global

esln,r                  ! Select SURF elements attached to the nodes within the circle

sfe,all,,pres,,PV       ! Apply pressure based on your calculation at the said time.

allsel,all

outres,all,all

*else

nsub,1

time=i*time_inc

wpcs,-1,0               ! WP @ GLOBAL ORIGIN

wpof,,V_p*time          ! OFFSET WP ALONG ITS Y AXIS (i.e. provide current position of center of circle along Y axis)

cswp,11,1               ! DEFINE Cylindrical COORDINATE SYSTEM @ WP ORIGIN

esel,s,ename,,154       ! Select SURF154 elements

sfed,all,,pres          ! Delete old pressures if any

nsle                    ! Select nodes attached to selected SURF elements

csys,0                  ! Set CSYS back to global

esln,r                  ! Select SURF elements attached to the nodes within the circle

sfe,all,,pres,,PV       ! Apply pressure based on your calculation at the said time.

allsel,all

outres,all,all

*endif

*enddo

Best regards,

HF

• SteBir
Subscriber

You can find a very helpful tutorial, which explains everything in detail.