Script anatomy
Opens the file in an editor. It is divided into five blocks:
- Initialize Database
- Define and mesh the model.
- Apply underlayment and load.
- Overcome
- Read and represent results.
Block 1 — Initialize the session
/CLEAR,START
/FILNAME,m00_cantilever,1
/OUTPUT,m00_session,out
/TITLE,M00 - Cantilever beam
/UNITS,SI| Command | Function | Verification |
|---|---|---|
/CLEAR,START | Clean the database and reread the initial settings. | The session returns to BEGIN. |
/FILNAME | Defines the base name of the exercise files. | Files start with m00_cantilever. |
/OUTPUT,m00_session,out | Redirects text output to a file other than the one reserved for the job. | After /INPUT, m00_session.out appears in the working directory. |
/TITLE | Assign a descriptive title to the model. | Appears in supported listings and charts. |
/UNITS,SI | Documents the unit convention. | It does not convert any value. |
Order matters.
/CLEAR appears before the title and the units because it restarts the database.
/FILNAME sets the job prefix (m00_cantilever) and booking
m00_cantilever.outThat’s why. /OUTPUT,m00_session,out goes right away with
an alternate name. You don't have to repeat these commands or use the Switch Output to menu on M00.
Block 2 — Enter PREP7 and define attributes
/PREP7
ET,1,SOLID185
MP,EX,1,210E9
MP,PRXY,1,0.30
TYPE,1
MAT,1/PREP7enters the preprocessor: geometry, elements, materials, mesh and conditions.ET,1,SOLID185defines the element type 1 as a structural solid.MP,EX,1,210E9defines the elastic modulus of the 1 material.MP,PRXY,1,0.30defines its Poisson coefficient.TYPE,1andMAT,1activate those boards before meshing.
M03 will justify in detail the choice of the element and compare idealizations. In M00 just recognize which element and material must be defined and active before generating elements.
Block 3 — Create geometry and mesh
BLOCK,0,1.0,0,0.10,0,0.05
ESIZE,0.025
VMESH,ALLBLOCKcreates a rectangular volume with X, Y and Z boundaries.ESIZEproposes an overall element size.VMESH,ALLmesh all selected volumes.
A visible mesh does not imply a converged mesh. M04 will study sensitivity and quality. Here we only need reasonable discretization to complete the flow.