CM2 FEM® SDK /release 5.3.0

by | Nov 16, 2022

  • 5.3.0
  • November, 2022.
  • Major release of the CM2 FEM® SDK.
  • All CM2 FEM® SDK.
  • Due to changes in the API, client applications must be recompiled against the new headers.

/caveats

  • Major version. Due to changes in the API, client applications must be recompiled against the new headers.
  • Lib names suffix is _53 (Windows®) and .5.3 (Linux, macOS®) for this series.
  • Linux and macOS: dynamic libs now follow the conventional version numbering scheme, have compatibility numbers and come with symlinks.
    Examples:

    • Linux: libcm2fem.so.5.3.0 (current) with symlinks from libcm2fem.so.5.3 (soname) from libcm2fem.so (base).
    • macOS: libcm2fem.5.3.0.dylib (current) with symlinks from libcm2fem.5.3.dylib (compatibility) from libcm2fem.dylib (base).
  • New macOS arm64 (Apple silicon) and universal (fat libs for both x86-64 and arm64 architectures) builds.
  • New macOS bash script cm2/scripts/install_name_prefix_tool.sh to change the dynamic libs entries (for exemple to @rpath/../lib).
  • Last version with Visual Studio 2013 builds (deprecated and no longer provided in future versions).
  • Last version with Win32 and Linux x86-32 builds (deprecated and no longer provided in future versions).
  • Last version with macOS pure Intel x86-64 builds (deprecated and no longer provided in future versions). Use the universal builds instead.

/new features

stress_mgr

  • Manages not only the thermal strains/loads (stress_mgr::set_thermal_load) as before but now also the initial strains (stress_mgr::set_initial_strains) and the initial stresses (stress_mgr::set_initial_stresses).
    Note that initial strains (aka. pre-strains) are removed from the constitutive laws (see breaking changes below).
    On top of allowing initial stresses, this fixes several bugs when initial strains were used together with thermal loads or with prescribed displacements (the initial strains were silently discarded).
    Moreover, as there is one stresses manager per load case, different initial strains/stresses are now possible on different load cases.
    Initial strains, stresses and thermal strains can be used together with cumulative effects (additional effects on linear models).
    Initial strains, stresses and thermal strains can be set on whole models (simple non-composite mechanical models) or element by element (thermal strains/loads can also be set on node-by-node basis).
    Thermal strains/loads can be associated to a pseudo-time evolution function (time-dependent temperature).

numerical_model_base

  • New members get_local_basis to compute the local basis of an element (orthonormalized covariant basis at centre).
    The initial strains/stresses (see stress_mgr::set_initial_strains and stress_mgr::set_initial_stresses above) must be expressed in these local bases.

solver_static_Newton

  • New Displacement-Control (DC) method (single DOF only). Useful for instance to pass so-called snap-through unstable points.
    With DC, the loads (all of them) are driven by a scalar load factor computed so that the value at the displacement-control DOF (solver_static_Newton::settings_type::DC_DOF) follows a user-defined curve (defined with loads_mgr::record_DOF_prescribed_value).

model_rod_gnl

  • Is now fully non-linear: large strains (Green-Lagrange) and large displacements.
    Used to be only small (Cauchy) strains and large displacements which is now supported by the new class model_rod_gnl1.

model_beam_lin, model_beam_gnl

  • New members set_simplified_Kg_flag and get_simplified_Kg_flag to control a new flag for the computation of the geometric stiffness matrix Kg:
    • false (the default): matrix Kg takes into account all forces (N, Q1, Q2) and all momentums (M1, M2, T).
      This allows for torsional buckling for instance.
    • true: matrix Kg takes only the axial force (N) into account (only axial load buckling).

FEM_Zstates

  • New class similar to FEM_states but for complex solutions.

FEM_Zmatrix

  • New real() (resp. imag()) member to return the real (resp. imaginary) part of the matrix as a FEM_matrix.

law_scalar_pow

  • New elastic power scalar constitutive law (no plasticity).

/improvements

solver_least_squares

  • Significant speed-ups (+25%) on shell element-by-element computations.

solver_modal, solver_modal_ldrv, solver_modal_gyroscopic, solver_buckling_models

  • Some speed-ups (up to +10%).

Miscellaneous

  • As usual, doc clean-ups, update of the manuals, update of the tutorials…

/fixes

All constitutive laws with initial strains (pre-strains)

  • The initial strains (aka. pre-strains) were silently discarded when used together with thermal loads or with prescribed displacements.

All solvers

  • The calls to the display handler for the info header miss the pass_thru parameter.

stiffness_diag, stiffness_sym, stiffness_sym_sparse, stiffness_sym_nl

  • Issues with code = 0 and ALM.

contact_plane, contact_cylinder, contact_sphere

  • Issues when lambda was very negative (but greater than -DBL_MAX).

solver_static_Newton

  • Some convergence improvements.

FEM_matrix, FEM_Zmatrix, FEM_states

  • Bug in member push_back.

/breaking changes

All constitutive laws with initial strains (pre-strains)

  • Initial strains are removed from the law’s data.
    One should now use stress_mgr::set_initial_strains to set initial strains.

model_rod_gnl

  • Now fully non-linear: large strains (Green-Lagrange) and large displacements.
    The old class (small strains, large displacements) is renamed model_rod_gnl1.

solver_z_impedance

  • Type of data_type::outputs is changed from FEM_Zmatrix to FEM_Zstates (new class).

solver_modal, solver_modal_ldrv, solver_buckling_Euler

  • In case of finite range, these solvers used to prefer the modes near the middle of the range, possibly discarding modes at both extremities of the range.
    Now, the preferred modes are always the modes with lowest frequency or critical value magnitude.

All FEM classes

  • Members ‘static size_t type_code()‘ which was supposed to return a hash code unique for each class are now replaced with ‘static const std::type_info& type_id()‘ for the classes and ‘virtual const std::type_info& obj_type_id() const‘ for the objects.
    This is to fix various limitations of the previous approach.