-
-
December 19, 2019 at 12:54 pm
HollyFart
SubscriberHello,
I'm trying to implement a moving pressure load with a circle shaped area, which is moving along the Y direction via do loop.
The pressure value is uniform and located within a circle shaped area.
The moving direction is the Y axis. It should start at the global CS (0,0,0) and heads towards the positive Y axis.
The load isn't moving, I don't have a clue why.
The script is posted below due to size restrictions in the post.
Best regards,
HF
-
December 19, 2019 at 1:40 pm
peteroznewman
SubscriberANSYS staff are not permitted to open attachments.
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
Radius = 0.005 ! m Radius of the load area
PV = 1E07 ! Pa Load value
nsub,time_steps
*do,I,1,time_steps,1
time=I*time_inc
Y_Local=V_p*time
wpcs,-1,0 ! WP @ GLOBAL ORIGIN
wpof,,Y_Local ! 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
nsel,r,loc,x,Radius ! Select nodes within radius of circle, 0.005m
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
time=I*time_inc
Y_Local=V_p*time
wpcs,-1,0 ! WP @ GLOBAL ORIGIN
wpof,,Y_Local ! 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
nsel,r,loc,x,Radius ! Select nodes within radius of circle, 0.005m
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
time=I*time_inc
Y_Local=V_p*time
wpcs,-1,0 ! WP @ GLOBAL ORIGIN
wpof,,Y_Local ! 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
nsel,r,loc,x,Radius ! Select nodes within radius of circle, 0.005m
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 -
December 19, 2019 at 1:42 pm
-
December 28, 2019 at 5:04 pm
-
December 28, 2019 at 5:08 pm
HollyFart
SubscriberAnd the used script:
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
Radius = 0.005 ! m Radius of the load area
PV = 1E07 ! Pa Load value
nsub,time_steps
*do,I,1,time_steps,1
time=I*time_inc
Y_Local=V_p*time
wpcs,-1,0 ! WP @ GLOBAL ORIGIN
wpof,,Y_Local ! 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
nsel,r,loc,x,Radius ! Select nodes within radius of circle, 0.005m
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
time=I*time_inc
Y_Local=V_p*time
wpcs,-1,0 ! WP @ GLOBAL ORIGIN
wpof,,Y_Local ! 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
nsel,r,loc,x,Radius ! Select nodes within radius of circle, 0.005m
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
time=I*time_inc
Y_Local=V_p*time
wpcs,-1,0 ! WP @ GLOBAL ORIGIN
wpof,,Y_Local ! 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
nsel,r,loc,x,Radius ! Select nodes within radius of circle, 0.005m
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
-
- You must be logged in to reply to this topic.

Boost Ansys Fluent Simulations with AWS
Computational Fluid Dynamics (CFD) helps engineers design products in which the flow of fluid components is a significant challenge. These different use cases often require large complex models to solve on a traditional workstation. Click here to join this event to learn how to leverage Ansys Fluids on the cloud, thanks to Ansys Gateway powered by AWS.

Earth Rescue – An Ansys Online Series
The climate crisis is here. But so is the human ingenuity to fight it. Earth Rescue reveals what visionary companies are doing today to engineer radical new ideas in the fight against climate change. Click here to watch the first episode.

Ansys Blog
Subscribe to the Ansys Blog to get great new content about the power of simulation delivered right to your email on a weekly basis. With content from Ansys experts, partners and customers you will learn about product development advances, thought leadership and trends and tips to better use Ansys tools. Sign up here.
- Solver Pivot Warning in Beam Element Model
- Saving & sharing of Working project files in .wbpz format
- Understanding Force Convergence Solution Output
- An Unknown error occurred during solution. Check the Solver Output…..
- What is the difference between bonded contact region and fixed joint
- User manual
- The solver engine was unable to converge on a solution for the nonlinear problem as constrained.
- whether have the difference between using contact and target bodies
- material damping and modal analysis
- Colors and Mesh Display
-
5290
-
3311
-
2471
-
1308
-
1016
© 2023 Copyright ANSYS, Inc. All rights reserved.