Location: BG Mica models @ 7969d101dce3 / BG tutorial model solid mechanics 4 Lorenz s-domain.cellml

Author:
Peter H <p.hunter@auckland.ac.nz>
Date:
2017-05-10 15:05:40+12:00
Desc:
Update
Permanent Source URI:
https://models.physiomeproject.org/workspace/496/rawfile/7969d101dce362cd6da085364838284fb6f9760a/BG tutorial model solid mechanics 4 Lorenz s-domain.cellml

<?xml version='1.0'?>
<model name="transfer_function" xmlns="http://www.cellml.org/cellml/1.1#" xmlns:cellml="http://www.cellml.org/cellml/1.1#">
    <!-- transfer function for Lorenz force actuator-->
    <units name="per_s">
        <unit exponent="-1" units="second"/>
    </units>
    <units name="per_s2">
        <unit exponent="-2" units="second"/>
    </units>
    <units name="J_per_C">
        <unit units="joule"/>
        <unit exponent="-1" units="coulomb"/>
    </units>
    <units name="J_per_C2">
        <unit units="joule"/>
        <unit exponent="-2" units="coulomb"/>
    </units>
    <units name="Js_per_C2">
        <unit units="joule"/>
        <unit units="second"/>
        <unit exponent="-2" units="coulomb"/>
    </units>
    <units name="Js2_per_C2">
        <unit units="joule"/>
        <unit exponent="2" units="second"/>
        <unit exponent="-2" units="coulomb"/>
    </units>
    <units name="m_per_s">
        <unit units="metre"/>
        <unit exponent="-1" units="second"/>
    </units>
    <units name="m_per_s2">
        <unit units="metre"/>
        <unit exponent="-2" units="second"/>
    </units>
    <units name="J_per_m">
        <unit units="joule"/>
        <unit exponent="-1" units="metre"/>
    </units>
    <units name="J_per_m2">
        <unit units="joule"/>
        <unit exponent="-2" units="metre"/>
    </units>
    <units name="J2_per_m4">
        <unit exponent="2" units="joule"/>
        <unit exponent="-4" units="metre"/>
    </units>
    <units name="Js_per_m2">
        <unit units="joule"/>
        <unit units="second"/>
        <unit exponent="-2" units="metre"/>
    </units>
    <units name="J2s2_per_m4">
        <unit exponent="2" units="joule"/>
        <unit exponent="2" units="second"/>
        <unit exponent="-4" units="metre"/>
    </units>
    <units name="Js2_per_m2">
        <unit units="joule"/>
        <unit exponent="2" units="second"/>
        <unit exponent="-2" units="metre"/>
    </units>
    <units name="Js_per_C_m">
        <unit units="joule"/>
        <unit units="second"/>
        <unit exponent="-1" units="coulomb"/>
        <unit exponent="-1" units="metre"/>
    </units>
    <component name="main">
        <variable initial_value="0" name="t" units="second"/>
        <variable initial_value="0.1" name="omega" units="per_s"/>
        <variable initial_value="1" name="omega_ref" units="per_s"/>
        <variable name="logOmega" units="dimensionless"/>
        <variable initial_value="0" name="E_1" units="J_per_C2"/>
        <variable initial_value="2000" name="E_2" units="J_per_m2"/>
        <variable initial_value="3.5" name="R_1" units="Js_per_C2"/>
        <variable initial_value="0.4" name="R_2" units="Js_per_m2"/>
        <variable initial_value="0.15" name="L_1" units="Js2_per_C2"/>
        <variable initial_value="0.018" name="L_2" units="Js2_per_m2"/>
        <variable initial_value="10" name="Bl" units="Js_per_C_m"/>
        <variable name="x_1" units="J_per_m2"/>
        <variable name="x_2" units="J2_per_m4"/>
        <!--var a_1: J2s2_per_m4;
var a_2: J2s2_per_m4;-->
        <!--var omega_1: per_s;
var omega_2: per_s;-->
        <variable name="omega_3" units="per_s"/>
        <!--var omega_sq_1: per_s2;
var omega_sq_2: per_s2;-->
        <variable name="logOmega_3" units="dimensionless"/>
        <variable name="G_real" units="Js_per_C2"/>
        <variable name="G_imag" units="Js_per_C2"/>
        <variable name="amplitude" units="Js_per_C2"/>
        <variable initial_value="1" name="amplitude_ref" units="Js_per_C2"/>
        <variable name="phase" units="dimensionless"/>
        <variable initial_value="1" name="phase_ref" units="dimensionless"/>
        <variable name="phase_degrees" units="dimensionless"/>
        <variable name="logAmplitude" units="dimensionless"/>
        <!--a_1 = 2{dimensionless}*L_2*E_2-sqr(R_2);
a_2 = sqr(R_2)-4{dimensionless}*L_2*E_2;-->
        <!--omega_sq_1 = (2{dimensionless}*E_2*L_2-sqr(R_2)+R_2*sqrt(a_2))/(2{dimensionless}*sqr(L_2));
omega_sq_2 = (2{dimensionless}*E_2*L_2-sqr(R_2)-R_2*sqrt(a_2))/(2{dimensionless}*sqr(L_2));-->
        <!--omega_1 = sqrt(omega_sq_1);
omega_2 = sqrt(omega_sq_2);-->
        <math xmlns="http://www.w3.org/1998/Math/MathML">
            <apply>
                <eq/>
                <ci>omega_3</ci>
                <apply>
                    <root/>
                    <apply>
                        <divide/>
                        <ci>E_2</ci>
                        <ci>L_2</ci>
                    </apply>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>logOmega_3</ci>
                <apply>
                    <log/>
                    <apply>
                        <divide/>
                        <ci>omega_3</ci>
                        <ci>omega_ref</ci>
                    </apply>
                </apply>
            </apply>
            <apply>
                <eq/>
                <apply>
                    <diff/>
                    <bvar>
                        <ci>t</ci>
                    </bvar>
                    <ci>omega</ci>
                </apply>
                <cn cellml:units="per_s2">1</cn>
            </apply>
            <apply>
                <eq/>
                <ci>logOmega</ci>
                <apply>
                    <log/>
                    <apply>
                        <divide/>
                        <ci>omega</ci>
                        <ci>omega_ref</ci>
                    </apply>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>x_1</ci>
                <apply>
                    <minus/>
                    <ci>E_2</ci>
                    <apply>
                        <times/>
                        <apply>
                            <power/>
                            <ci>omega</ci>
                            <cn cellml:units="dimensionless">2</cn>
                        </apply>
                        <ci>L_2</ci>
                    </apply>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>x_2</ci>
                <apply>
                    <plus/>
                    <apply>
                        <power/>
                        <ci>x_1</ci>
                        <cn cellml:units="dimensionless">2</cn>
                    </apply>
                    <apply>
                        <power/>
                        <apply>
                            <times/>
                            <ci>omega</ci>
                            <ci>R_2</ci>
                        </apply>
                        <cn cellml:units="dimensionless">2</cn>
                    </apply>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>G_real</ci>
                <apply>
                    <plus/>
                    <ci>R_1</ci>
                    <apply>
                        <divide/>
                        <apply>
                            <times/>
                            <ci>R_2</ci>
                            <apply>
                                <power/>
                                <apply>
                                    <times/>
                                    <ci>omega</ci>
                                    <ci>Bl</ci>
                                </apply>
                                <cn cellml:units="dimensionless">2</cn>
                            </apply>
                        </apply>
                        <ci>x_2</ci>
                    </apply>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>G_imag</ci>
                <apply>
                    <times/>
                    <ci>omega</ci>
                    <apply>
                        <plus/>
                        <ci>L_1</ci>
                        <apply>
                            <divide/>
                            <apply>
                                <times/>
                                <apply>
                                    <power/>
                                    <ci>Bl</ci>
                                    <cn cellml:units="dimensionless">2</cn>
                                </apply>
                                <ci>x_1</ci>
                            </apply>
                            <ci>x_2</ci>
                        </apply>
                    </apply>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>amplitude</ci>
                <apply>
                    <root/>
                    <apply>
                        <plus/>
                        <apply>
                            <power/>
                            <ci>G_real</ci>
                            <cn cellml:units="dimensionless">2</cn>
                        </apply>
                        <apply>
                            <power/>
                            <ci>G_imag</ci>
                            <cn cellml:units="dimensionless">2</cn>
                        </apply>
                    </apply>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>phase</ci>
                <apply>
                    <arctan/>
                    <apply>
                        <divide/>
                        <ci>G_imag</ci>
                        <ci>G_real</ci>
                    </apply>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>phase_degrees</ci>
                <apply>
                    <divide/>
                    <apply>
                        <times/>
                        <ci>phase</ci>
                        <cn cellml:units="dimensionless">180</cn>
                    </apply>
                    <pi/>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>logAmplitude</ci>
                <apply>
                    <log/>
                    <apply>
                        <divide/>
                        <ci>amplitude</ci>
                        <ci>amplitude_ref</ci>
                    </apply>
                </apply>
            </apply>
        </math>
    </component>
</model>