CM2 FEM® SDK /release 5.1.0 Preview 2
- 5.1.0 Preview 2
 - September, 2021
 - All CM2 FEM® SDK
 - Major release of the CM2 FEM® SDK
 - Due to changes in the API, client applications must be recompiled against the new headers
 
/caveats
- Preview version. API is still subject to changes.
 - Major version. Due to changes in the API, client applications must be recompiled against the new headers.
 - Lib names suffix is 
_51for this series. - Win32 and Linux x86 (32-bit) builds shall be soon deprecated.
 
/new features
solver_static_linear, solver_heat_static_linear
- Augmented Lagrange Method (ALM) to enforce more precisely the constraints (
link,link_directional,rigid_body_lin…)
The constraints are satisfied by applying still a high penalty stiffness but much lower than with the Pure Penalty Method (PPM) together with a few correction iterations.
Pros: The constraints are satisfied accurately and the condition numbers of the global stiffness matrices stay reasonable.
Cons: Needs some additional iterations and internal forces (i.e. reactions) inside the constraints are null (replaced with intern Lagrange multipliers).
ALM is enabled by default but can be disabled and return to PPM through the newsettings_type::method_code. 
solver_modal, solver_modal_ldrv
- New 
settings_type::sort_modes_by_PF_flagto sort the dynamic modes by decreasing effective participation factor (most effective modes first).
Defaults tosort_modes_by_PF_flag = false(lowest frequencies first as before). 
solver_least_squares
- Can now smooth Tresca equivalent stresses on nodes with the new 
FEM_NODES_TRESCAsetting. - Can also now smooth signed Tresca with the 
FEM_NODES_TRESCA_SIGNED(signed with the sign of the trace of the stress tensors). - Now works also on 
FEM_NODES_VON_MISES_SIGNED(signed with the sign of the trace of the stress tensors).
Note that signed Tresca and Von Mises stresses can flip between positive and negative values when trace is close to zero. 
FEM_matrix, FEM_Zmatrix, FEM_states
- New members 
push_backandpop_backto append/remove columns and states. 
Constitutive laws
- New unsymmetrical elasto-plastic laws 
law_scalar_ep_perfect_unsymandlaw_scalar_ep_piecewise_linear_unsym.
These scalar laws are made of two elasto-plastic laws, one for traction (positive strains) and one for compression (negative strains).
The laws are of the same class (bothlaw_scalar_ep_perfector bothlaw_scalar_ep_piecewise_linear) but can have different diagrams (data) and state limits. law_scalar_nl,law_spring_nl,pulley_rigid: new sigmoid smoothing (controlled by a newlambdaparameter) to make the diagrams continuous and derivable (thus helping the Newton algorithm).
elementary_load
UNIFORMandTRAPEZEmomentums are now allowed on linear 2-node beams (used to be silently discarded).
These distributed momentums give however only approximative results (exact forUNIFORMandTRAPEZEforces, exact also forPUNCTUALforces and momentums).
context
- New 
get_max_penalty_factorandset_max_penalty_factor(default =DBL_MAX). Experienced users only. 
Miscellaneous
- In 
numerical_model_base::set_relaxations: new output parametersunsigned& fictitious0andunsigned& fictitious1to access the underlying fictitious nodes.
For the same purpose,fem::hingeis now equipped with new membersunsigned get_fictitious0() constandunsigned get_fictitious1() const. - New functions 
Tresca_stressandTresca_stresseswith optional parametersigned_flag(default =false). 
/improvements
All types of models and elements
- Major optimisations in the computation of elementary matrices and vectors:
- Speed-ups in the 30-60 % range for 
model_beam_lin,model_beam_mass,model_beam_gyroscopicwithCM2_EDGE2mesh type. - Speed-ups in the 10-30 % range for other models and elements.
 
 - Speed-ups in the 30-60 % range for 
 
elementary_server, solver_reactions
- Major optimisations (on top of the above improvements in elementary computations).
Total speed-ups can be massive.
 
solver_static_linear, solver_heat_static_linear
- On many load cases, the assembly of RHS is parallelized over load cases instead of within each load case (coarser grain parallelism).
 - On many load cases with different Dirichlet conditions, the resolution of RHS is parallelized over load cases (was single threaded).
 
All solvers
- Simpler and more reliable penalty factors.
Now based on the diagonal terms associated to the penalty DOFs in the global stiffness matrix (instead of a characteristic value based on the constitutive laws’ parameters).
They are now computed only when penalty models are present (link,link_directional,rigid_body_lin…)
In addition, these penalty factors are now stored inside the solutionsFEM_statesto avoid their recomputation. 
model_shell_lin, model_shell_gnl
- Simpler and more reliable artificial drilling stiffness.
Now based on rotation diagonal terms of the actual elementary stiffness matrices instead of a characteristic value based on the constitutive laws’ parameters (which could be null or irrelevant)
 
/fixes
solver_modal_ldrv
- Members 
data_type::Ksanddata_type::Mswere inverted. 
solver_static_linear, solver_heat_static_linear
- Bug with prescribed values on free DOFs in multiple load cases.
 
solver_least_squares
- Wrong output values in 
data_type::RHS_requested_memoryanddata_type::outputs_requested_memory. 
post_processor_1d
- Bad stress diagram with non-linear beam models.
 - Bad stress diagram with rod models (linear and non-linear).
 
FEM_states
- Intern parameters of elasto-plastic solid constitutive laws weren’t properly stored.
This could cause states to be non-equilibrated (leading to wrong restarts, bad reactions…) 
Miscellaneous
- Doc fixes and clarifications.
 
/breaking changes
context
- With the new formula for the penalty factors (see above), small numerical differences vs previous versions can be expected (when constraints models are present and Pure Penalty Method is still used).
The new default minimum penalty factor (now 1, was 1E12) can also cause some numerical differences. 
elementary_server, solver_condensation_static, solver_energy, solver_reactions
- Parameter 
reset_penalty_factorsremoved from therunfunctions (not needed any more because the penalty factors are passed through theFEM_statesinputsparameter and do not need to be recomputed). 
loads_mgr
- The Dirichlet boundary conditions 
loads_mgr::record_nodal_prescribed_value(s)andloads_mgr::record_DOF_prescribed_value(s)are no longer cumulative.
When several Dirichlet values are associated to the same DOF, the last one prevails (overwrites any previous one).
The Neumann boundary conditionsloads_mgr::record_NM_load,loads_mgr::record_nodal_loadandloads_mgr::record_DOF_load(s)remain cumulative. 
law_scalar_nl, law_spring_nl
- At threshold 
e_ithe stiffness used to be the right valuek_i+1.
Now the value is the _average_ valuek(e) = 1/2 (k_i + k_i+1)(even when leaving the defaultlambda = DBL_MAX, i.e. no smoothing). 
mass_punctual
- The offset vector represents the physical position of the mass minus the position of the node (used to be the other way round).
 
solver_modal, solver_modal_ldrv, solver_modal_gyroscopic, solver_buckling_Euler
- Deprecated data fields 
S_modes,D_modes,B_modes… have been removed.
UseS_outputs,D_outputs,B_outputs… instead. - Deprecated data fields 
S_modes_requested_memory,D_modes_requested_memory,B_modes_requested_memory… have been removed.
UseS_outputs_requested_memory,D_outputs_requested_memory,B_outputs_requested_memory… instead. 
Miscellaneous
- Function 
compute_3D_stressrenamedCauchy_stresses. - Functions 
compute_stress_invariantsrenamedstress_invariants. - Functions 
compute_Von_Mises_stressrenamedVon_Mises_stressandVon_Mises_stresses.
They gain the optional parametersigned_flag(default =false) asTresca_stressandTresca_stressesto sign with the sign of the trace of the stress tensors. - The orthonormal Eigen vectors computed by 
eigen_pairs(3D) are now always positively oriented (trihedral with determinant = +1).