20 stable releases (5 major)

5.0.0 Oct 30, 2024
4.4.0 Oct 30, 2024
4.3.4 May 3, 2024
4.3.3 Mar 26, 2024
0.1.0 Mar 10, 2023

#8 in #gmt

Download history 58/week @ 2024-07-23 9/week @ 2024-07-30 9/week @ 2024-08-06 1/week @ 2024-09-10 1/week @ 2024-09-17 70/week @ 2024-09-24 4/week @ 2024-10-01 3/week @ 2024-10-08 2/week @ 2024-10-15 267/week @ 2024-10-29 20/week @ 2024-11-05

292 downloads per month
Used in 5 crates

MIT license

575KB
6.5K SLoC

gmt_dos-clients_fem

Crates.io Documentation

A client for the GMT FEM crate gmt-fem.


lib.rs:

This module is used to build the state space model of the telescope structure

A state space model is represented by the structure [DiscreteModalSolver] that is created using the builder DiscreteStateSpace. The transformation of the FEM continuous 2nd order differential equation into a discrete state space model is performed by the [Exponential] structure (for the details of the transformation see the exponential module ).

Example

The following example loads a FEM model and converts it into a state space model setting the sampling rate and the damping coefficients and truncating the eigen frequencies. A single input and a single output are selected.

use gmt_fem::FEM;
use gmt_dos_clients_fem::{DiscreteStateSpace, DiscreteModalSolver, Exponential,
              fem_io::{actors_inputs::OSSM1Lcl6F, actors_outputs::OSSM1Lcl}};

    let sampling_rate = 1e3; // Hz
    let fem = FEM::from_env()?;
    let mut fem_ss: DiscreteModalSolver<Exponential> = DiscreteStateSpace::from(fem)
        .sampling(sampling_rate)
        .proportional_damping(2. / 100.)
        .ins::<OSSM1Lcl6F>()
        .outs::<OSSM1Lcl>()
        .build()?;

Dependencies

~68MB
~1M SLoC