Marc & Structures
Course index

Save your progress

Enter your email and we will send a secure sign-in link. There is no password and the first link creates your account.

Elements, materials, and sections

ET, KEYOPT, MP, TYPE, MAT, SECTYPE, SECNUM, EMODIF, and attribute audits

On this page
  1. Objectives
  2. Prerequisites and downloads
  3. How to use this lesson
  4. Session map
  5. Before you code — Predict
  6. Physical Model — Choosing Idealization
  7. Why we use SOLID185
  8. Sections: When they appear
  9. APDL Model — Defining Is Not Activating
  10. Step 1 — Define the Element Type
  11. Step 2 — Define Isotropic Materials
  12. Step 3 — Activate and mesh
  13. Step 4 — Prepare the center band
  14. Step 5 — Audit elements, not pointers
  15. Step 6 — Correct an Existing Assignment
  16. CSV contract
  17. Reusable pattern
  18. Bug hunt
  19. Verifiable challenge — Bi-material beam
  20. Self-assessment
  21. Evidence of learning
  22. Exit checklist
  23. Technical traceability

You already know how to create a geometry and find regions without relying on IDs. Now it's time to decide what mathematical behavior each element will have and demonstrate that the stored attributes match your intent.

YOUR MISSION

You will build a solid steel beam with SOLID185, you will separate the operations of defining, activating, and assigning, and you will generate a CSV audit. In the challenge, you will change only the central band to aluminum without remeshing.

Guiding question: How do you know which material an existing element has?

Objectives

By completing M03 you will be able to demonstrate that:

  • You choose between a beam, sheet or solid idealization according to the physical question.
  • Justify SOLID185 without claiming that a 3D model is always more accurate.
  • Distinguish defined tables, active pointers, and stored attributes.
  • You define an isotropic elastic material by EX and PRXY.
  • Explain when a section is needed and when the geometry already contains it.
  • Fix existing attributes with EMODIF.
  • Type and material audits using ESEL, *GET and relationships between counts.

Prerequisites and downloads

  • Have completed M02 or know how to create mid_elems by centroids.
  • Maintain consistent SI units: meters, newtons, and pascals.
  • Understand that M03 ends in /PREP7: we will not apply loads or solve yet.

How to use this lesson

PathDurationCoverage
First win 30–35 min Idealization, defining attributes and meshing with basic audit.
Complete 70–75 min In addition, correction with EMODIF, bi-material challenge and CSV contract.

Recommendation: never rely on the active pointer to demonstrate attributes. Count what was stored in each element.

Session map

  1. Mission: objectives, downloads and idealization prediction.
  2. Mental models define versus enable attributes.
  3. Demonstration: ET, MP, meshing and element audit.
  4. Error hunting: misleading pointers and mixed materials.
  5. Challenge: bimaterial beam with full partition.
  6. Mastery: final test that records demonstrated mastery and recommends M04.

Before you code — Predict

Suppose you run these instructions after meshing the entire beam with material 1:

MAT,2
ALLSEL,ALL

Do existing elements become aluminium? No. MAT,2 changes the material that subsequent elements will receive. It does not rewrite existing elements. This distinction will be the common thread of the lesson.

Physical Model — Choosing Idealization

The same part can be represented by an axis, a midsurface, or its volume. Each reduction retains some information and discards other information. The most complex element is not automatically the most correct: the appropriate idealization is the simplest that answers reliably to the engineering question.

Comparison of BEAM188, SHELL181 and SOLID185 idealizations
The input geometry changes with the idealization: line, midsurface, or volume.
ElementRepresentingNodal Degrees of FreedomSection
BEAM188Line 3D3 translations + 3 rotations; optional warpIt is defined with section commands.
SHELL181Midsurface3 translations + 3 rotationsThickness and layers defined through a section.
SOLID185Volume 3D3 translationsThe shape of the volume provides the section.

Why we use SOLID185

SOLID185 is a solid structural element of eight nodes and three displacements per node. We chose it because the running example will later need faces to apply pressures, inspect local fields, and model possible interfaces. It also keeps visible the relationship between volume, elements and nodes that you learned in M02.

A didactic decision is not a universal rule

For the overall displacement of a slender beam, BEAM188 can be more efficient and appropriate. A solid 3D demands proper resolution of its mesh and boundary conditions. M04 will study that responsibility.

Sections: When they appear

A line or surface alone does not contain all the transverse geometry:

! Conceptual beam example
ET,2,BEAM188
SECTYPE,1,BEAM,RECT
SECDATA,beam_b,beam_h
TYPE,2
SECNUM,1

! Conceptual shell example
ET,3,SHELL181
SECTYPE,2,SHELL
SECDATA,thickness
TYPE,3
SECNUM,2

SECTYPE starts the definition, SECDATA provides their data and SECNUM activates the number for subsequent elements. In our BLOCK, width and height are already part of the volume; adding an additional section for SOLID185 does not add physical information.

APDL Model — Defining Is Not Activating

Flow from active tables and pointers to stored and audited attributes
Active attributes are copied when each element is created; they then belong to the element.
ActioncommandsWhat changes: 
DefinitionET, KEYOPT, MP, SECTYPETables available in the database.
EnabledTYPE, MAT, SECNUMPointers used in the next creation.
Assign on CreateVMESHAttributes copied to new elements.
ModifyEMODIFAttributes of elements that already exist.
AuditESEL, *GET, ETLIST, MPLISTEvidence of the assigned attributes.

Step 1 — Define the Element Type

ET,1,SOLID185
KEYOPT,1,2,0

ET,1,SOLID185 saves the formulation under type number 1. KEYOPT,1,2,0 makes explicit the complete integration formulation with B-bar, which is the default option. Writing the default value documents the intent; it does not mean that the other options are interchangeable without study.

Step 2 — Define Isotropic Materials

young_steel=210E9
nu_steel=0.30
young_aluminum=70E9
nu_aluminum=0.33

MP,EX,1,young_steel
MP,PRXY,1,nu_steel
MP,EX,2,young_aluminum
MP,PRXY,2,nu_aluminum

Isotropic linear elasticity requires Young's modulus EX and Poisson's ratio PRXY. The number after the property is the material ID, not a unit. In the SI system of the course, 210E9 represents 210 GPa.

/UNITS doesn't convert your numbers

/UNITS,SI records the chosen system, but does not transform 210000 into 210E9. Dimensional consistency remains the responsibility of the script.

Step 3 — Activate and mesh

TYPE,1
MAT,1

BLOCK,0,beam_l,0,beam_h,0,beam_b
ESIZE,mesh_h
VMESH,ALL

Just before VMESH, the pointers say, “the next elements will be type 1 and material 1.” During meshing, each element stores those numbers. Defining material 2 does not assign it to anything yet.

M03 Limit: ESIZE and VMESH remain infrastructure. M04 will justify size, local controls, quality and convergence.

Mesh with material numbering MAT=1 uniform steel
Figure 3 Uniform Steel Material (MAT=1) visible with /PNUM,MAT as a result of VMESH.

Step 4 — Prepare the center band

ALLSEL,ALL
ESEL,S,CENT,X,0.4*beam_l,0.6*beam_l
CM,mid_elems,ELEM
*GET,n_mid_elems,ELEM,0,COUNT
ALLSEL,ALL

We reused the robust pattern of M02. The component does not depend on IDs and will be the exact scope of the challenge modification.

Step 5 — Audit elements, not pointers

*GET,n_elements,ELEM,0,COUNT

ESEL,S,TYPE,,1
*GET,n_type1,ELEM,0,COUNT
ALLSEL,ALL

ESEL,S,MAT,,1
*GET,n_mat1,ELEM,0,COUNT
ALLSEL,ALL

ESEL,S,MAT,,2
*GET,n_mat2,ELEM,0,COUNT
ALLSEL,ALL

ESEL,S,MAT,,2 asks which elements store material 2. It does not ask which material is active. The base case passes only if:

n_type1 = n_elements
n_mat1  = n_elements
n_mat2  = 0
0 < n_mid_elems < n_elements

ETLIST,1 and MPLIST,ALL complement the audit: they show the definitions, while counts demonstrate assignments.

Step 6 — Correct an Existing Assignment

In the challenge, the correct sequence preserves the selected scope:

CMSEL,S,mid_elems
EMODIF,ALL,MAT,2
ALLSEL,ALL

Here ALL means all selected elements. Therefore, ALLSEL,ALL must come afterward. If you run it first, you will change the entire beam.

Central band with MAT=2 aluminum after EMODIF in mid_elems
Figure 4. Bimaterial challenge: aluminum center band (MAT=2) after EMODIF is applied to mid_elems.

CSV contract

03_elements_materials.mac generates m03_attribute_audit.csv:

case,n_elements,n_type1,n_mat1,n_mat2,n_mid_elems,young_steel,young_aluminum,young_ratio,passes

We do not set an exact number of elements because it may vary with the mesher or version. Relationships do express the intent of the model. In the base case, passes=1 demands that everything be steel; in the challenge, the band must be aluminum and the modulus ratio must equal 3.

Reusable pattern

! 1. Define
ET,type_id,element_name
MP,EX,material_id,young

! 2. Activate
TYPE,type_id
MAT,material_id

! 3. Create
VMESH,ALL

! 4. Audit
ESEL,S,MAT,,material_id
*GET,n_assigned,ELEM,0,COUNT
ALLSEL,ALL

Bug hunt

Run 03_bug_hunt.mac. It does not target fatal errors: it contains five plausible decisions that produce a model different from the stated intent. For each one, write: symptom, cause, test and correction.

  1. Check the steel elastic modulus units.
  2. Identify which material was active during VMESH.
  3. Explain your answer. SECNUM,1 does not create a section and is left over in this solid.
  4. Locate where the scope of mid_elems is lost.
  5. Demonstrate why MAT,1 does not repair existing elements.

Verifiable challenge — Bi-material beam

Complete 03_challenge.mac. The region 0.4L ≤ X ≤ 0.6L will be aluminum and the rest steel. Do not mesh again, do not use IDs and do not enter /SOLU.

TestCriterionMeaning
Typen_type1=n_elementsThe formulation did not change.
Bandn_mat2=n_mid_elemsOnly the component received aluminum.
Partitionn_mat1+n_mat2=n_elementsThere is no shortage or excess of elements.
Two materialsn_mat1>0 and n_mat2>0The challenge did not degenerate into a homogeneous case.
Propertiesyoung_ratio=3Inputs are consistent.
Resultpasses=1All tests passed.

Self-assessment

  1. What is the difference between MP,EX,2,70E9 and MAT,2?
  2. Why does querying the active pointer not demonstrate the material assigned to existing elements?
  3. What information does a section add to BEAM188?
  4. Why do we not add SECNUM to the homogeneous solid?
  5. What happens if you run ALLSEL,ALL before EMODIF,ALL,MAT,2?
> View Short Answers
  1. The first defines a property of material 2; the second activates that ID for future element creation.
  2. Because the pointer and stored attributes are distinct states.
  3. The transverse geometry that a line does not contain.
  4. The section is already represented by the dimensions of the volume.
  5. The entire selected model is modified, not only the central band.

Evidence of learning

Keep in your work folder:

  • m03_attribute_audit.csv of the base case with passes=1.
  • The CSV of the challenge with both materials present and the central band correctly assigned.
  • A screenshot or text excerpt from ETLIST,1 and MPLIST,ALL.
  • Your diagnosis of the five defects of 03_bug_hunt.mac.
  • A technical sentence justifying why SOLID185 is used in this course.

Exit checklist

  • ☐ I can distinguish beam, sheet and solid model.
  • ☐ I know which commands define tables and which ones activate pointers.
  • ☐ I understand when VMESH copies the attributes.
  • ☐ I can change existing elements with EMODIF.
  • ☐ I audit TYPE and MAT through counts, not visual appearance.
  • ☐ My base case and challenge generate a reproducible CSV.
  • ☐ I have not applied loads or solved the model.

Technical traceability

This lesson builds on ANSYS mechanical APDL Element Reference for BEAM188, SHELL181 and SOLID185; Material Reference for isotropic linear elasticity; and Command Reference 2024 R1 for the commands presented.

Next step: M04

We already know what elements we have created and what properties they possess. In M04 we will no longer accept an element size out of habit: we will measure quality and sensitivity to justify the mesh.

Show that you can do it without hints

You need at least 80% and every critical check correct. You can retry without a limit; each attempt gives you a focused review path.

8 checks

Competency

Assign and demonstrate element type and material.

Expected evidence

n_type1=n_mat1=n_elements, n_mat2=0 and passes=1 in the base case.

Save mastery across devices

Enter your email to receive a secure link. Your account stores only progress, attempts, and scores.

1.What is the difference between defining MAT,1 and activating MAT,1? Critical
2.Why is SOLID185 used in this educational model?
3.Enter the elastic modulus of steel in Pa. Critical
Pa
4.In the homogeneous base case, how many elements should MAT,2 have? Critical
elements
5.Which command allows you to correct the attribute of already created elements?
6.The active pointer shows MAT,1. Does that prove that all the elements are MAT,1? Critical
7.After assigning MAT,2 to a component, you mesh another region. Which state must you control? Retrieval M02
8.Which evidence is stronger for proving element material? Retrieval M00

The assessment is scored and progress is saved in this browser.