Skip to content

[StructuralMechanics] Add direct harmonic strategy (with imaginary displacements)#14345

Open
juancamarotti wants to merge 18 commits intomasterfrom
structural/create_direct_harmonic_strategy
Open

[StructuralMechanics] Add direct harmonic strategy (with imaginary displacements)#14345
juancamarotti wants to merge 18 commits intomasterfrom
structural/create_direct_harmonic_strategy

Conversation

@juancamarotti
Copy link
Copy Markdown
Contributor

@juancamarotti juancamarotti commented Apr 1, 2026

Summary

This PR adds a new direct harmonic analysis strategy to the StructuralMechanicsApplication, together with the required infrastructure to prescribe imaginary harmonic loads and a dedicated test.

Main changes

  • Added a new DirectHarmonicAnalysisStrategy
  • Added a new direct harmonic analysis test
  • Added an ImaginaryPointLoadCondition to prescribe imaginary load contributions separately
  • Introduced the use of two different load SubModelParts:
    • one for the real harmonic loads
    • one for the imaginary harmonic loads

Mathematical meaning of the direct harmonic strategy

The direct harmonic strategy solves the structural response directly in the frequency domain by assuming a harmonic ansatz for the unknown displacement field:

$\mathbf{u}(t) = \Re\left( \hat{\mathbf{u}} e^{i \omega t} \right)$

where:

  • $\hat{\mathbf{u}}$ is the complex displacement amplitude
  • $\omega$ is the excitation circular frequency
  • $\Re(\cdot)$ denotes the real part

Starting from the dynamic equilibrium equation

$\mathbf{M}\ddot{\mathbf{u}} + \mathbf{C}\dot{\mathbf{u}} + \mathbf{K}\mathbf{u} = \mathbf{f}(t)$

and assuming a harmonic load

$\mathbf{f}(t) = \Re\left( \hat{\mathbf{f}} e^{i \omega t} \right)$

the problem is transformed into the complex algebraic system

$\left( \mathbf{K} - \omega^2 \mathbf{M} + i \omega \mathbf{C} \right)\hat{\mathbf{u}} = f_{r} + i f_i$

This is what is referred to here as the direct harmonic strategy:
instead of projecting the response onto a modal basis, the full frequency-domain system is assembled and solved directly for the complex displacement vector $\hat{\mathbf{u}}$.

Details

Direct harmonic strategy

A new DirectHarmonicAnalysisStrategy was implemented to solve the harmonic response directly in the frequency domain, without relying on modal superposition.

The strategy:

  • assembles the mass and stiffness operators
  • optionally assembles the damping operator
  • builds the complex dynamic matrix
  • solves the complex-valued linear system with a complex linear solver
  • stores the real and imaginary parts of the displacement separately

Real and imaginary loads

In the direct harmonic formulation, the excitation vector is complex:

$f = f_{r} + i f_i$

To assemble this consistently, the implementation uses two different load SubModelParts:

  • a real load submodelpart, containing the conditions that contribute to $f_{r}$
  • an imaginary load submodelpart, containing the conditions that contribute to $f_{i}$

This separation is needed because the direct harmonic strategy assembles the real and imaginary RHS contributions independently and then combines them into the final complex right-hand side.

Imaginary point load condition

A new ImaginaryPointLoadCondition was introduced to assemble imaginary load contributions independently from the real ones.

This makes it possible to define:

  • real harmonic loads through the standard point load condition
  • imaginary harmonic loads through a dedicated condition

Tests

A new test was added for the direct harmonic analysis strategy.

Included in this PR

  • DirectHarmonicAnalysisStrategy
  • ImaginaryPointLoadCondition
  • support for separate real and imaginary load submodelparts
  • new direct harmonic analysis test

@juancamarotti juancamarotti self-assigned this Apr 1, 2026
@juancamarotti juancamarotti requested a review from a team as a code owner April 1, 2026 15:12
@juancamarotti juancamarotti changed the title Structural/create direct harmonic strategy [StructuralMechanics] Add direct harmonic strategy Apr 1, 2026
@philbucher
Copy link
Copy Markdown
Member

cool stuff!

Quirin was also working on this I think, he was struggling with complex dofs, see #6238

I am curious as to how you solved this, will take a look in the next days (dont wait for me if urgent)

@juancamarotti
Copy link
Copy Markdown
Contributor Author

cool stuff!

Quirin was also working on this I think, he was struggling with complex dofs, see #6238

I am curious as to how you solved this, will take a look in the next days (dont wait for me if urgent)

Basically, the builder and solver is providing $M$, $K$ and $C$ to the strategy, and the assembly of the complex RHS is done inside the DirectHarmonicAnalysisStrategy through 2 different SubModelParts, one for the real component of the load and the other for the complex component. Then, we build the assemble the complex LHS/RHS and use a ComplexSolver.
It´s quite straightforward!

@juancamarotti juancamarotti changed the title [StructuralMechanics] Add direct harmonic strategy [StructuralMechanics] Add direct harmonic strategy (with imaginary DOFs) Apr 2, 2026
@juancamarotti juancamarotti changed the title [StructuralMechanics] Add direct harmonic strategy (with imaginary DOFs) [StructuralMechanics] Add direct harmonic strategy (with imaginary displacements) Apr 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants