Skip to content

Axisymmetric (2Daxi) fixes and improvements#31

Open
chemiskyy wants to merge 5 commits into
masterfrom
fix/axisymetric
Open

Axisymmetric (2Daxi) fixes and improvements#31
chemiskyy wants to merge 5 commits into
masterfrom
fix/axisymetric

Conversation

@chemiskyy
Copy link
Copy Markdown
Member

Add and consolidate axisymmetric (2Daxi) handling across the codebase:

  • Introduce ModelingSpace.is_axisymmetric property and central _axi_utils.axi_volume_weight to compute the 2pir integration weight.
  • Proper 2Daxi kinematics: capture reference radius at gauss points (assembly.sv["_R0_gausspoints"]) and compute hoop deformation correctly (F_θθ = r_current / R_reference) in _comp_grad_disp; refresh current r per iteration for weights and symbolic operators.
  • Replace ad-hoc checks of space._dimension == '2Daxi' with space.is_axisymmetric and apply the axi weight consistently in Inertia, ArtificialDamping, InterfaceForce, DistributedLoad, ImplicitDynamic paths and other weakforms.
  • Add explicit NotImplementedError for several features not supported in 2Daxi (IPCContact, PeriodicBC, RigidTie / RigidTie2D, ImplicitDynamic2, RotaryInertia, various TL / fbar / bbar / mixed / hourglass branches) with explanatory messages.
  • Improve docs and conventions: expand Mechanical3D docstring describing Voigt slot ordering and axisymmetric mapping; clarify constitutive-law/UMAT notes in elastic_anisotropic, elastic_orthotropic, composite_ud and simcoon_umat about the hoop slot mapping.
  • Post-processing: add _revolve_axi_field and refactor axi_to_3d/AxiMultiFrameDataSet to revolve 2D fields into 3D correctly (handling vectors and 6-Voigt fields and strain vs stress differences).
  • Add example thick_cylinder_inflation_axi.py demonstrating verification of F_θθ = r/R and showing how to extract per-GP F; add tests (tests/test_axi_phase3.py and others) to guard against regressions in 2pir weighting and hoop handling.

These changes centralize axisymmetric behaviour, fix a longstanding hoop-component bug in finite-strain UL, and make unsupported 2Daxi/3D feature interactions explicit.

Add and consolidate axisymmetric (2Daxi) handling across the codebase:

- Introduce ModelingSpace.is_axisymmetric property and central _axi_utils.axi_volume_weight to compute the 2*pi*r integration weight.
- Proper 2Daxi kinematics: capture reference radius at gauss points (assembly.sv["_R0_gausspoints"]) and compute hoop deformation correctly (F_θθ = r_current / R_reference) in _comp_grad_disp; refresh current r per iteration for weights and symbolic operators.
- Replace ad-hoc checks of space._dimension == '2Daxi' with space.is_axisymmetric and apply the axi weight consistently in Inertia, ArtificialDamping, InterfaceForce, DistributedLoad, ImplicitDynamic paths and other weakforms.
- Add explicit NotImplementedError for several features not supported in 2Daxi (IPCContact, PeriodicBC, RigidTie / RigidTie2D, ImplicitDynamic2, RotaryInertia, various TL / fbar / bbar / mixed / hourglass branches) with explanatory messages.
- Improve docs and conventions: expand Mechanical3D docstring describing Voigt slot ordering and axisymmetric mapping; clarify constitutive-law/UMAT notes in elastic_anisotropic, elastic_orthotropic, composite_ud and simcoon_umat about the hoop slot mapping.
- Post-processing: add _revolve_axi_field and refactor axi_to_3d/AxiMultiFrameDataSet to revolve 2D fields into 3D correctly (handling vectors and 6-Voigt fields and strain vs stress differences).
- Add example thick_cylinder_inflation_axi.py demonstrating verification of F_θθ = r/R and showing how to extract per-GP F; add tests (tests/test_axi_phase3.py and others) to guard against regressions in 2*pi*r weighting and hoop handling.

These changes centralize axisymmetric behaviour, fix a longstanding hoop-component bug in finite-strain UL, and make unsupported 2Daxi/3D feature interactions explicit.
Copy link
Copy Markdown
Collaborator

@pruliere pruliere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a results/thermal3D folder that probably has been added by error. I think we need to remove it before validating the PR

Comment thread fedoo/constraint/ipc_contact.py Outdated
Comment thread fedoo/constraint/rigid_tie.py Outdated
Comment thread fedoo/core/mechanical3d.py Outdated
Comment thread fedoo/core/modelingspace.py
chemiskyy added 4 commits May 6, 2026 17:49
Delete binary/generated output files for the thermal3D case to clean up the repository and reduce tracked large artifacts. Removed results/thermal3D/thermal3D.vtk and the three NumPy archives results/thermal3D/thermal3D_0.npz, thermal3D_1.npz, thermal3D_2.npz; these can be regenerated by re-running the simulation pipeline.
Enable axisymmetric support for IPCContact by applying a 2π·r per-vertex integration weight to IPC barrier gradients and Hessians (broadcast over DOFs) and building a sparse diag for Hessian scaling. The previous NotImplementedError for ModelingSpace '2Daxi' was removed and axisymmetric behavior is documented; vertices on the symmetry axis receive zero weight. RigidTie and RigidTie2D now emit warnings instead of raising for 2Daxi and explain the limitations of enforcing full 3D rigid motions under axisymmetry. Added example scripts: tube_compression_ipc.py (IPC self-contact axisymmetric example) and _tube_compression_bench.py (headless penalty vs IPC benchmark driver used for IPC-axisymmetric review), and small doc clarifications in mechanical3d and modelingspace about 2Daxi/2Dstress slot semantics. Also import warnings where needed.
Delete examples/03-advanced/_tube_compression_bench.py, a headless benchmark driver that ran penalty and IPC variants and printed reduced metrics. Also remove the os.chdir call from examples/03-advanced/tube_compression_ipc.py to avoid changing the process working directory when running or importing the example.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants