Skip to content

Comments

Fix and Feature/comprehensive objective#77

Open
chemiskyy wants to merge 3 commits intomasterfrom
feature/comprehensive_objective
Open

Fix and Feature/comprehensive objective#77
chemiskyy wants to merge 3 commits intomasterfrom
feature/comprehensive_objective

Conversation

@chemiskyy
Copy link
Member

This pull request introduces several enhancements and new features to the continuum mechanics objective rates module, focusing on expanding the set of available objective rates and improving the modularity and clarity of the code. The most notable changes include the addition of the Hughes-Winget incremental rotation formula, support for new objective rates (Truesdell and logarithmic_F), and the implementation of new tangent modulus transformation functions using the Green-Naghdi and logarithmic spins. The Python wrapper is updated to expose these new objective rates and ensure correct handling in both single- and multi-point cases.

New objective rates and rotation formula support:

  • Added the Hughes_Winget function to compute incremental rotations using the Hughes-Winget midpoint formula, with a detailed Doxygen comment for documentation.
  • Enabled support for the "Truesdell" and "logarithmic_F" objective rates in the Python wrapper (objective_rates.cpp), including updates to the corate name mapping and switch-case logic for both single and multiple points. [1] [2] [3] [4] [5] [6] [7] [8]

Tangent modulus transformation functions (Green-Naghdi and logarithmic spins):

  • Added new functions for transforming tangent moduli between different stress and strain measures using the Green-Naghdi spin: DtauDe_GreenNaghdiDD_2_DSDE, DsigmaDe_GreenNaghdiDD_2_DSDE, DSDE_2_Dtau_GreenNaghdiDD, and DSDE_2_Dsigma_GreenNaghdiDD, all with thorough documentation. [1] [2] [3]
  • Added convenience functions for logarithmic spin transformations: DSDE_2_Dtau_logarithmicDD and DSDE_2_Dsigma_logarithmicDD.

Python wrapper improvements:

  • Refactored the calculation of strain increments (de) in the Python wrapper to use the new Hughes_Winget function for relevant objective rates, improving code clarity and consistency. [1] [2] [3]

These changes collectively increase the flexibility and robustness of the library for advanced finite strain constitutive modeling and facilitate easier use from Python.

Declare Hughes_Winget and several new tangent-converter functions in objective_rates.hpp (Green-Naghdi / logarithmic variants, DSDE_2_Dsigma_* and DSDE_2_Dtau_* helpers). Update python wrapper objective_rate to recognize new corate keys (truesdell, log_F) and wire cases to call Truesdell and logarithmic_F; integrate Hughes_Winget to compute rotation increments (DR_N) and adjust incremental strain (de) computations for the new options. Extend Lt_convert mapping to support many additional converter keys, convert stress vectors to tensor form where needed, and handle both 2D/3D inputs. Also include minor error-handling and formatting tweaks (inv error message, spacing around omp_set_num_threads).
Add Hughes_Winget helper and Green-Naghdi objective-rate wrappers (DtauDe_GreenNaghdiDD_2_DSDE, DsigmaDe_GreenNaghdiDD_2_DSDE, DSDE_2_Dtau_GreenNaghdiDD, DSDE_2_Dsigma_GreenNaghdiDD) plus convenience reverse functions for logarithmic rate. Fix incorrect invF index ordering in DSDE->DSDE conversions (corrected element access order). Change routines that previously multiplied results by J to instead premultiply Lt by J before calling Dtau* helpers. Use get_BBBB_GN for Green-Naghdi B construction and add error handling for matrix inverse/determinant failures. Minor formatting/cleanup.
Add comprehensive tests for objective-rate functionality across Python and C++ suites. Python pytest additions (simcoon-python-builder/test/test_core/run_test.py) introduce a shared deformation_pair fixture and tests that verify: all rate names produce the same symmetric D tensor; Truesdell return shapes and return_de behavior; logarithmic_F aliasing; 3D batch-mode consistency; and small-increment de ≈ DTime * t2v_strain(D). C++ test updates (test/Libraries/Continuum_mechanics/Tobjective_rates.cpp) add Hughes–Winget checks (identity, orthogonality, consistency with Jaumann), ensure equality of D across all rate implementations, compare Truesdell vs logarithmic_F DF/L, and verify logarithmic_R vs logarithmic_F spectral outputs. Also add the compiled test binary testBin/Continuum_mechanics/Tobjective_rates.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

1 participant