diff --git a/cross_section.pyc b/cross_section.pyc new file mode 100644 index 0000000..82112c1 Binary files /dev/null and b/cross_section.pyc differ diff --git a/doc/build/doctrees/beam.doctree b/doc/build/doctrees/beam.doctree new file mode 100644 index 0000000..f21bf63 Binary files /dev/null and b/doc/build/doctrees/beam.doctree differ diff --git a/doc/build/doctrees/environment.pickle b/doc/build/doctrees/environment.pickle index ca3fdd6..fcc5c6f 100644 Binary files a/doc/build/doctrees/environment.pickle and b/doc/build/doctrees/environment.pickle differ diff --git a/doc/build/doctrees/index.doctree b/doc/build/doctrees/index.doctree index 0713011..e99ac39 100644 Binary files a/doc/build/doctrees/index.doctree and b/doc/build/doctrees/index.doctree differ diff --git a/doc/build/doctrees/iogebt.doctree b/doc/build/doctrees/iogebt.doctree new file mode 100644 index 0000000..1ab29d6 Binary files /dev/null and b/doc/build/doctrees/iogebt.doctree differ diff --git a/doc/build/doctrees/iovabs.doctree b/doc/build/doctrees/iovabs.doctree index c8572ca..f42ed44 100644 Binary files a/doc/build/doctrees/iovabs.doctree and b/doc/build/doctrees/iovabs.doctree differ diff --git a/doc/build/doctrees/ms_analysis.doctree b/doc/build/doctrees/ms_analysis.doctree new file mode 100644 index 0000000..11c7233 Binary files /dev/null and b/doc/build/doctrees/ms_analysis.doctree differ diff --git a/doc/build/doctrees/ms_module.doctree b/doc/build/doctrees/ms_module.doctree new file mode 100644 index 0000000..5d5fe85 Binary files /dev/null and b/doc/build/doctrees/ms_module.doctree differ diff --git a/doc/build/doctrees/prebeam.doctree b/doc/build/doctrees/prebeam.doctree new file mode 100644 index 0000000..0dc8aad Binary files /dev/null and b/doc/build/doctrees/prebeam.doctree differ diff --git a/doc/build/doctrees/sg_io.doctree b/doc/build/doctrees/sg_io.doctree new file mode 100644 index 0000000..5e4829a Binary files /dev/null and b/doc/build/doctrees/sg_io.doctree differ diff --git a/doc/build/doctrees/sg_module.doctree b/doc/build/doctrees/sg_module.doctree new file mode 100644 index 0000000..4f5bd6c Binary files /dev/null and b/doc/build/doctrees/sg_module.doctree differ diff --git a/doc/build/doctrees/utils.doctree b/doc/build/doctrees/utils.doctree new file mode 100644 index 0000000..2c981fc Binary files /dev/null and b/doc/build/doctrees/utils.doctree differ diff --git a/doc/build/html/_sources/beam.rst.txt b/doc/build/html/_sources/beam.rst.txt new file mode 100644 index 0000000..c649e85 --- /dev/null +++ b/doc/build/html/_sources/beam.rst.txt @@ -0,0 +1,21 @@ +Class Module for Beam +===================== + +.. highlight:: python + +:: + + import msgpi.ms.beam + +Beam segment +------------ + +.. autoclass:: msgpi.ms.beam.BeamSegment + :members: + +Beam +---- + +.. autoclass:: msgpi.ms.beam.Beam + :members: + diff --git a/doc/build/html/_sources/index.rst.txt b/doc/build/html/_sources/index.rst.txt index cc41001..1fc1901 100644 --- a/doc/build/html/_sources/index.rst.txt +++ b/doc/build/html/_sources/index.rst.txt @@ -10,11 +10,9 @@ Welcome to Some scripts's documentation! :maxdepth: 2 :caption: Contents: - sg - iovabs - ioutils - presg - analysis + sg_module + ms_module + utils Indices and tables ================== diff --git a/doc/build/html/_sources/iogebt.rst.txt b/doc/build/html/_sources/iogebt.rst.txt new file mode 100644 index 0000000..c775346 --- /dev/null +++ b/doc/build/html/_sources/iogebt.rst.txt @@ -0,0 +1,27 @@ +I/O Module for GEBT +=================== + +.. highlight:: python + +:: + + import msgpi.ms.iogebt + +Reading Functions +----------------- + +.. autofunction:: msgpi.ms.iogebt.readGEBTIn + +.. autofunction:: msgpi.ms.iogebt.readGEBTOut + +.. autofunction:: msgpi.ms.iogebt.readGEBTOutNode + +.. autofunction:: msgpi.ms.iogebt.readGEBTOutStatic + +.. autofunction:: msgpi.ms.iogebt.readGEBTOutEigen + +Writing Functions +----------------- + +.. autofunction:: msgpi.ms.iogebt.writeGEBTIn + diff --git a/doc/build/html/_sources/ms_analysis.rst.txt b/doc/build/html/_sources/ms_analysis.rst.txt new file mode 100644 index 0000000..92b2588 --- /dev/null +++ b/doc/build/html/_sources/ms_analysis.rst.txt @@ -0,0 +1,16 @@ +analysis Module for GEBT +======================== + +.. highlight:: python + +:: + + import msgpi.ms.analysis + + +.. autofunction:: msgpi.ms.analysis.solveGEBT + +.. autofunction:: msgpi.ms.analysis.runGEBT + +.. autofunction:: msgpi.ms.analysis.solvePLECS + diff --git a/doc/build/html/_sources/ms_module.rst.txt b/doc/build/html/_sources/ms_module.rst.txt new file mode 100644 index 0000000..02e3b0c --- /dev/null +++ b/doc/build/html/_sources/ms_module.rst.txt @@ -0,0 +1,11 @@ +Structure Module +================ + +.. toctree:: + :maxdepth: 2 + :caption: Contents: + + beam + iogebt + prebeam + ms_analysis diff --git a/doc/build/html/_sources/prebeam.rst.txt b/doc/build/html/_sources/prebeam.rst.txt new file mode 100644 index 0000000..0c2e326 --- /dev/null +++ b/doc/build/html/_sources/prebeam.rst.txt @@ -0,0 +1,14 @@ +prebeam Module for GEBT +======================= + +.. highlight:: python + +:: + + import msgpi.ms.prebeam + +Preprocessing Function +---------------------- + +.. autofunction:: msgpi.ms.prebeam.preBeam + diff --git a/doc/build/html/_sources/sg_io.rst.txt b/doc/build/html/_sources/sg_io.rst.txt new file mode 100644 index 0000000..b6f1baa --- /dev/null +++ b/doc/build/html/_sources/sg_io.rst.txt @@ -0,0 +1,9 @@ +SG I/O Module +============= + +.. toctree:: + :maxdepth: 2 + :caption: Contents: + + iovabs + ioutils diff --git a/doc/build/html/_sources/sg_module.rst.txt b/doc/build/html/_sources/sg_module.rst.txt new file mode 100644 index 0000000..5017285 --- /dev/null +++ b/doc/build/html/_sources/sg_module.rst.txt @@ -0,0 +1,12 @@ +SG Module +============= + +.. toctree:: + :maxdepth: 2 + :caption: Contents: + + sg + presg + iovabs + ioutils + analysis diff --git a/doc/build/html/_sources/utils.rst.txt b/doc/build/html/_sources/utils.rst.txt new file mode 100644 index 0000000..ba80118 --- /dev/null +++ b/doc/build/html/_sources/utils.rst.txt @@ -0,0 +1,12 @@ +Utility Functions +================= + +.. highlight:: python + +:: + + import msgpi.utils + +.. autofunction:: msgpi.utils.calcRotationTensorFromParameters + +.. autofunction:: msgpi.utils.calcCab diff --git a/doc/build/html/analysis.html b/doc/build/html/analysis.html index 04daa40..8660f26 100644 --- a/doc/build/html/analysis.html +++ b/doc/build/html/analysis.html @@ -35,7 +35,8 @@ - + + @@ -81,11 +82,15 @@

Contents:

@@ -131,6 +136,8 @@
  • Docs »
  • +
  • SG I/O Module »
  • +
  • analysis Module
  • @@ -221,8 +228,10 @@

    analysis Module + + - + diff --git a/doc/build/html/beam.html b/doc/build/html/beam.html new file mode 100644 index 0000000..de11497 --- /dev/null +++ b/doc/build/html/beam.html @@ -0,0 +1,562 @@ + + + + + + + + + + + Class Module for Beam — msgpi documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    + + + + + +
    + +
    + + + + + + + + + + + + + + + + + +
    + + + + +
    +
    +
    +
    + +
    +

    Class Module for Beam

    +
    import msgpi.ms.beam
    +
    +
    +
    +

    Beam segment

    +
    +
    +class msgpi.ms.beam.BeamSegment
    +

    Class for a beam segment.

    +
    +
    +calcLengthSq()
    +

    Calculate the square of the segment length.

    + +++ + + + + + +
    Returns:Squred length of the segment.
    Return type:float
    +
    + +
    +
    +coords = None
    +

    Coordinates of starting and ending points. +[[x1, x2, x3], [x1, x2, x3]]

    + +++ + + + +
    Type:list(list(float))
    +
    + +
    +
    +css = None
    +

    Cross-section labels. +[starting, ending]

    + +++ + + + +
    Type:list(int)
    +
    + +
    +
    +local_frame_id = None
    +

    Local frame id.

    + +++ + + + +
    Type:int
    +
    + +
    +
    +num_divisions = None
    +

    Number of division of the segment.

    + +++ + + + +
    Type:int
    +
    + +
    +
    +points = None
    +

    Point labels. +[starting point, ending point]

    + +++ + + + +
    Type:list(int)
    +
    + +
    +
    +twist = None
    +

    Twist.

    + +++ + + + +
    Type:float
    +
    + +
    + +
    +
    +

    Beam

    +
    +
    +class msgpi.ms.beam.Beam
    +

    Class for a slender beam-like structure.

    +

    This class is mainly for the GEBT code.

    +
    +
    +analysis_type = None
    +

    Analysis type (GEBT).

    + +++ + + + +
    Type:int
    +
    + +
    +
    +angular_velocity = None
    +

    Angular velocity of the rotating beam. +[wa1, wa2, wa3]

    + +++ + + + +
    Type:list(float)
    +
    + +
    +
    +echo()
    +

    Print the beam data.

    +
    + +
    +
    +findPtCoordByName(name)
    +

    Find key point coordinates by point id.

    + +++ + + + + + + + +
    Parameters:name (int) – Point id.
    Returns:Point coordinates.
    Return type:list(float)
    +
    + +
    +
    +findSectionByName(name)
    +

    Find sectional properties by section id.

    + +++ + + + + + + + +
    Parameters:name (int) – Section id.
    Returns:Sectional properties.
    Return type:MaterialSection
    +
    + +
    +
    +frames = None
    +

    Local self.frames

    +
    + +
    +
    +linear_velocity = None
    +

    Linear velocity of the first key point. +[va1, va2, va3]

    + +++ + + + +
    Type:list(float)
    +
    + +
    +
    +max_iteration = None
    +

    Max iteration.

    + +++ + + + +
    Type:int
    +
    + +
    +
    +mconditions = None
    +

    Member conditions (B.C. and loads).

    + +++ + + + +
    Type:list
    +
    + +
    +
    +name = None
    +

    Name of the beam.

    + +++ + + + +
    Type:str
    +
    + +
    +
    +num_eigens = None
    +

    Number of eigen analysis resutls.

    + +++ + + + +
    Type:int
    +
    + +
    +
    +num_steps = None
    +

    Number of analysis steps.

    + +++ + + + +
    Type:int
    +
    + +
    +
    +pconditions = None
    +

    Point conditions (B.C. and loads).

    + +++ + + + +
    Type:list
    +
    + +
    +
    +points = None
    +

    Key point id and coordinates. +{ptid: [x1, x2, x3], …}

    + +++ + + + +
    Type:dict(int, list(float))
    +
    + +
    +
    +sections = None
    +

    Effective properties of cross-sections. +{sid: MaterialSection object, …}

    + +++ + + + +
    Type:dict(int, MaterialSection)
    +
    + +
    +
    +segments = None
    +

    Beam segments +{bsid: BeamSegment object, …}

    + +++ + + + +
    Type:dict(int, BeamSegment)
    +
    + +
    + +
    +
    + + +
    + +
    + + +
    +
    + +
    + +
    + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/build/html/genindex.html b/doc/build/html/genindex.html index 94b56dc..dc5b324 100644 --- a/doc/build/html/genindex.html +++ b/doc/build/html/genindex.html @@ -26,6 +26,7 @@ + @@ -81,11 +82,9 @@

    Contents:

    @@ -153,12 +152,14 @@

    Index

    A + | B | C | D | E | F | G | I + | L | M | N | O @@ -173,6 +174,24 @@

    A

    + +
    + +

    B

    + + +
    @@ -180,6 +199,12 @@

    A

    C

    @@ -187,6 +212,10 @@

    C

  • compliance_refined (msgpi.sg.MaterialSection attribute)
  • constants (msgpi.sg.MaterialSection attribute) +
  • +
  • coords (msgpi.ms.beam.BeamSegment attribute) +
  • +
  • css (msgpi.ms.beam.BeamSegment attribute)
  • @@ -206,16 +235,18 @@

    D

    E

    @@ -273,6 +310,18 @@

    I

    +

    L

    + + + +
    +

    M

    - +
    • MaterialSection (class in msgpi.sg) +
    • +
    • max_iteration (msgpi.ms.beam.Beam attribute) +
    • +
    • mconditions (msgpi.ms.beam.Beam attribute)
    • mocombos (msgpi.sg.StructureGene attribute)
    • @@ -298,19 +351,27 @@

      M

      N

      - +
      @@ -330,12 +391,22 @@

      O

      P

        +
      • preBeam() (in module msgpi.ms.prebeam) +
      • +
      • preSG() (in module msgpi.presg) +
      • preSG1D() (in module msgpi.presg)
      • prop_elem (msgpi.sg.StructureGene attribute) @@ -346,15 +417,27 @@

        P

        R

        @@ -362,6 +445,10 @@

        R

        S

          +
        • solveGEBT() (in module msgpi.ms.analysis) +
        • +
        • solvePLECS() (in module msgpi.ms.analysis) +
        • stiffness (msgpi.sg.MaterialSection attribute)
        • stiffness_refined (msgpi.sg.MaterialSection attribute) @@ -393,10 +484,12 @@

          T

          - +
          Parameters:
            -
          • fn (str) – VABS output file name (e.g. example.sg.k).
          • -
          • scrnout (bool) – Whether to print message to screen.
          • -
          -
          Parameters:fn (string) – VABS output file name (e.g. example.sg.k)
          @@ -264,7 +268,7 @@

          Writing Functions - + diff --git a/doc/build/html/ms_analysis.html b/doc/build/html/ms_analysis.html new file mode 100644 index 0000000..da3531b --- /dev/null +++ b/doc/build/html/ms_analysis.html @@ -0,0 +1,287 @@ + + + + + + + + + + + analysis Module for GEBT — msgpi documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
          + + + +
          + + + + + +
          + +
          + + + + + + + + + + + + + + + + + +
          + + + + +
          +
          +
          +
          + +
          +

          analysis Module for GEBT

          +
          import msgpi.ms.analysis
          +
          +
          +
          +
          +msgpi.ms.analysis.solveGEBT(beam_xml, scrnout=True)
          +

          Carry out a global beam analysis using GEBT.

          +

          This function includes the preprocessing of the input data, +running GEBT and parsing the results.

          + +++ + + + +
          Parameters:
            +
          • beam_xml (str) – Beam xml input file.
          • +
          • scrnout (bool) – Switch for printing GEBT cmd outputs.
          • +
          +
          +
          + +
          +
          +msgpi.ms.analysis.runGEBT(fn_input, scrnout=True)
          +

          Run GEBT analysis.

          + +++ + + + + + + + +
          Parameters:
            +
          • fn_input (str) – File name of the GEBT input.
          • +
          • scrnout (bool) – Switch for printing GEBT cmd outputs.
          • +
          +
          Returns:

          +
          Return type:

          File name of the GEBT output.

          +
          +
          + +
          +
          +msgpi.ms.analysis.solvePLECS(length, compliance, x1, f1=0, f2=0, f3=0, m1=0, m2=0, m3=0)
          +

          Solve the static problem of a prismatic, linearly elastic, +cantilever beam. Find the three displacements and three rotations +of a point x1 given loads f1, f2, f3, m1, m2, m3 applied at the +tip.

          +

          Equations (5.59) and (5.61) from the book +Nonlinear Composite Beam Theory by D. H. Hodges +are used.

          + +++ + + + + + + + +
          Parameters:
            +
          • length (float) – Total length of the beam.
          • +
          • compliance (list(list(float))) – The 6x6 compliance matrix of the beam cross-section.
          • +
          • x1 (float) – The location where the result is wanted.
          • +
          +
          Returns:

          Results (displacement, rotations, forces, moments).

          +
          Return type:

          list(list(float))

          +
          +
          + +
          + + +
          + +
          + + +
          +
          + +
          + +
          + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/build/html/utilities.html b/doc/build/html/ms_module.html similarity index 54% rename from doc/build/html/utilities.html rename to doc/build/html/ms_module.html index f27541d..2b27bc4 100644 --- a/doc/build/html/utilities.html +++ b/doc/build/html/ms_module.html @@ -8,7 +8,7 @@ - Utility Functions — Some scripts documentation + Structure Module — msgpi documentation @@ -34,7 +34,9 @@ - + + + @@ -48,7 +50,7 @@ - Some scripts + msgpi @@ -79,9 +81,15 @@

          Contents:

          -
            -
          • Class Module for MSM Structure Gene
          • -
          • SG I/O Module for VABS
          • + @@ -96,7 +104,7 @@ @@ -127,13 +135,13 @@
          • Docs »
          • -
          • Utility Functions
          • +
          • Structure Module
          • - View page source + View page source
          • @@ -146,10 +154,27 @@
            -
            -

            Utility Functions

            -
            import msg.utilities
            -
            + @@ -159,12 +184,21 @@

            Utility Functions + + + + + + +

            +

            - © Copyright 2019, s.t. + © Copyright 2020, msm group

            diff --git a/doc/build/html/msmio.html b/doc/build/html/msmio.html deleted file mode 100644 index 4440db7..0000000 --- a/doc/build/html/msmio.html +++ /dev/null @@ -1,195 +0,0 @@ - - - - - - - - - - - I/O Module for MSM Codes — Some scripts documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            - - - -
            - - - - - -
            - -
            - - - - - - - - - - - - - - - - - -
            - - - - -
            -
            -
            -
            - -
            -

            I/O Module for MSM Codes

            -
            import msmio
            -
            -
            -
            - - -
            - -
            - - -
            -
            - -
            - -
            - - - - - - - - - - - - \ No newline at end of file diff --git a/doc/build/html/objects.inv b/doc/build/html/objects.inv index ad30697..daa10a4 100644 Binary files a/doc/build/html/objects.inv and b/doc/build/html/objects.inv differ diff --git a/doc/build/html/others.html b/doc/build/html/prebeam.html similarity index 54% rename from doc/build/html/others.html rename to doc/build/html/prebeam.html index 45485bd..9ce1e51 100644 --- a/doc/build/html/others.html +++ b/doc/build/html/prebeam.html @@ -8,7 +8,7 @@ - Others — Some scripts documentation + prebeam Module for GEBT — msgpi documentation @@ -34,7 +34,9 @@ - + + + @@ -48,7 +50,7 @@ - Some scripts + msgpi @@ -79,8 +81,18 @@

            Contents:

            -
              -
            • Class Module for MSM Structure Genome
            • + @@ -95,7 +107,7 @@ @@ -126,13 +138,15 @@
            • Docs »
            • -
            • Others
            • +
            • Structure Module »
            • + +
            • prebeam Module for GEBT
            • - View page source + View page source
            • @@ -145,26 +159,33 @@
              -
              -

              Others

              -
              import tempscripts
              +  
              +

              prebeam Module for GEBT

              +
              import msgpi.ms.prebeam
               
              +
              +

              Preprocessing Function

              -
              -tempscripts.calcCTMKeyPoints(hw, a1, a2=None, r1=None, r2=None, hf=None)
              -

              Calculate key points of lenticular-type cross-section

              +
              +msgpi.ms.prebeam.preBeam(fn_beam, mode=1, sections=[])
              +

              Preprocessor of GEBT

              @@ -172,6 +193,7 @@

              Others + + + + + + + +

              - © Copyright 2019, s.t. + © Copyright 2020, msm group

              diff --git a/doc/build/html/presg.html b/doc/build/html/presg.html index d617082..48f861c 100644 --- a/doc/build/html/presg.html +++ b/doc/build/html/presg.html @@ -35,8 +35,8 @@ - - + + @@ -82,11 +82,15 @@

              Contents:

              @@ -132,6 +136,8 @@
            • Docs »
            • +
            • SG I/O Module »
            • +
            • presg Module
            • @@ -233,10 +239,10 @@

              presg Module - + - + diff --git a/doc/build/html/search.html b/doc/build/html/search.html index 80b1434..49f557a 100644 --- a/doc/build/html/search.html +++ b/doc/build/html/search.html @@ -25,6 +25,7 @@ + @@ -81,11 +82,9 @@

              Contents:

              diff --git a/doc/build/html/searchindex.js b/doc/build/html/searchindex.js index 2cb4329..610c022 100644 --- a/doc/build/html/searchindex.js +++ b/doc/build/html/searchindex.js @@ -1 +1 @@ -Search.setIndex({docnames:["analysis","index","ioutils","iovabs","presg","sg"],envversion:{"sphinx.domains.c":1,"sphinx.domains.changeset":1,"sphinx.domains.cpp":1,"sphinx.domains.javascript":1,"sphinx.domains.math":2,"sphinx.domains.python":1,"sphinx.domains.rst":1,"sphinx.domains.std":1,sphinx:54},filenames:["analysis.rst","index.rst","ioutils.rst","iovabs.rst","presg.rst","sg.rst"],objects:{"msgpi.analysis":{run:[0,0,1,""],solve:[0,0,1,""]},"msgpi.io.iovabs":{readVABSIn:[3,0,1,""],readVABSOutHomo:[3,0,1,""],writeVABSElementOrientations:[3,0,1,""],writeVABSElements:[3,0,1,""],writeVABSIn:[3,0,1,""],writeVABSMOCombos:[3,0,1,""],writeVABSMacroData:[3,0,1,""],writeVABSMaterials:[3,0,1,""],writeVABSNodes:[3,0,1,""]},"msgpi.io.utils":{textToMatrix:[2,0,1,""],writeFormatFloats:[2,0,1,""],writeFormatFloatsMatrix:[2,0,1,""],writeFormatIntegers:[2,0,1,""],writeFormatIntegersMatrix:[2,0,1,""]},"msgpi.presg":{preSG1D:[4,0,1,""],preSG:[4,0,1,""],readMaterialFromXMLElement:[4,0,1,""]},"msgpi.sg":{MaterialSection:[5,1,1,""],StructureGene:[5,1,1,""]},"msgpi.sg.MaterialSection":{compliance:[5,2,1,""],compliance_refined:[5,2,1,""],constants:[5,2,1,""],density:[5,2,1,""],eff_props:[5,2,1,""],failure_criterion:[5,2,1,""],mass_center:[5,2,1,""],mass_mc:[5,2,1,""],mass_origin:[5,2,1,""],name:[5,2,1,""],shear_center:[5,2,1,""],smdim:[5,2,1,""],stiffness:[5,2,1,""],stiffness_refined:[5,2,1,""],strength:[5,2,1,""],type:[5,2,1,""]},"msgpi.sg.StructureGene":{analysis:[5,2,1,""],degen_element:[5,2,1,""],elem_orient:[5,2,1,""],elem_prop:[5,2,1,""],elementids1d:[5,2,1,""],elementids2d:[5,2,1,""],elementids3d:[5,2,1,""],elementids:[5,2,1,""],elements:[5,2,1,""],findComboByMaterialOrientation:[5,3,1,""],findMaterialByName:[5,3,1,""],fn_gmsh_msh:[5,2,1,""],global_displacements:[5,2,1,""],global_loads:[5,2,1,""],global_loads_dist:[5,2,1,""],global_loads_type:[5,2,1,""],global_rotations:[5,2,1,""],initial_curvature:[5,2,1,""],initial_twist:[5,2,1,""],materials:[5,2,1,""],mocombos:[5,2,1,""],model:[5,2,1,""],name:[5,2,1,""],nodes:[5,2,1,""],nonuniform_temperature:[5,2,1,""],num_slavenodes:[5,2,1,""],oblique:[5,2,1,""],omega:[5,2,1,""],physics:[5,2,1,""],prop_elem:[5,2,1,""],sgdim:[5,2,1,""],smdim:[5,2,1,""],summary:[5,3,1,""],trans_element:[5,2,1,""]}},objnames:{"0":["py","function","Python function"],"1":["py","class","Python class"],"2":["py","attribute","Python attribute"],"3":["py","method","Python method"]},objtypes:{"0":"py:function","1":"py:class","2":"py:attribute","3":"py:method"},terms:{"2e12":5,"2k12":5,"class":1,"default":5,"float":[2,5],"function":1,"import":[0,2,3,4,5],"int":[0,2,3,4,5],"return":[2,3,4,5],"true":[0,2,3,4],The:[2,4],after:[2,4],all:2,analysi:[1,4,5],angl:5,anisotrop:5,append:2,arrai:2,beam:5,bernoulli:5,block:2,bool:[0,2,3,4],brief:5,c11:5,c12:5,c13:5,c21:5,c22:5,c23:5,c31:5,c32:5,c33:5,calcctmkeypoint:[],calcul:[],carri:[0,4],center:5,charact:2,cid:5,classic:5,code:0,combin:5,command:0,complianc:5,compliance_refin:5,conduct:5,configur:5,connect:5,constant:5,constitut:[],content:1,continuum:5,convert:2,coordin:5,criterion:5,cross:[],curvatur:5,data:[3,4],defualt:5,degen_el:5,dehomogen:[0,4,5],densiti:5,deprec:5,design:[0,4],desir:2,dict:5,dimens:[0,4,5],dimensiona:[],displac:5,distribut:5,e11:5,e12:5,e13:5,e22:5,e23:5,e33:5,each:[2,5],eff_prop:5,effect:5,eid:5,elast:5,elem_ori:5,elem_prop:5,element:[4,5],elementid:5,elementids1d:5,elementids2d:5,elementids3d:5,elementtre:4,engin:5,envelop:[0,4],etre:4,euler:5,exampl:[2,3],excect:0,failur:[0,4,5],failure_criterion:5,fals:4,file:[0,2,3,4,5],find:5,findcombobymaterialorient:5,findmaterialbynam:5,finit:5,flag:5,flatten:[],fmt:[2,3],fn_gmsh_msh:5,fn_vabs_in:3,fobj:[2,3],format:[0,2,3,4],found:5,from:[3,4],g12:5,g13:5,g23:5,gene:[1,3,4],gener:[0,4,5],genom:[],global:5,global_displac:5,global_load:5,global_loads_dist:5,global_loads_typ:5,global_rot:5,gmsh:5,going:2,goint:2,height:[],homogen:[0,3,4,5],ids:5,includ:5,index:1,indic:[0,4],initi:[0,4,5],initial_curvatur:5,initial_twist:5,input:[0,3,4],input_nam:0,integ:2,iovab:3,isotrop:5,isotropi:5,k11:5,k12:5,k13:5,k22:5,kei:5,kirchhoff:5,length:[],lenticular:[],level:5,line:2,list:[2,5],load:5,local:[0,4,5],love:5,m11:5,m12:5,m22:5,macroscop:[0,5],manual:5,mass:5,mass_cent:5,mass_mc:5,mass_origin:5,materi:[1,4],materialsect:5,matrix:[2,5],mesh:5,messag:[0,3,4],microscop:[],mid:5,middl:[],mindlin:5,mocombo:5,model:[0,4,5],modul:1,msg:5,msgpi:[0,2,3,4,5],msm:1,msmio:[],n11:5,n12:5,n13:5,n22:5,n23:5,name:[0,3,4,5],newlin:2,nid1:5,nid2:5,nid:5,nodal:5,node:5,none:5,nonuniform_temperatur:5,nu12:5,nu13:5,nu23:5,num_slavenod:5,number:[2,5],numpi:2,object:[2,5],obliqu:5,omega:5,onli:5,option:[],orient:5,origin:5,orthotrop:5,out:[0,4],output:[2,3],page:1,paramet:[0,2,3,4,5],physic:5,piezoelectr:5,piezoelectromagnet:5,piezomagnet:5,plate:5,point:[],preprocessor:4,presg1d:4,presg:1,print:[0,3,4,5],prop_elem:5,properti:5,radian:[],radiu:[],ratio:[0,4],read:[1,4],readmaterialfromxmlel:4,readvabsin:3,readvabsouthomo:3,recov:[0,4,5],refin:5,reissner:5,repres:2,result:3,root:4,rotat:5,run:0,s11:5,s12:5,s13:5,s22:5,s23:5,s33:5,screen:[3,4],scrnout:[0,3,4],search:1,section:1,see:5,sff:3,sfi:3,sg_xml:[0,4],sgdim:5,shear:5,shear_cent:5,shell:5,side:[],slave:5,smdim:[0,4,5],solid:[],solv:0,solver:[0,4],stiff:5,stiffness_refin:5,store:5,str:[0,2,3,4,5],strain:5,strength:[0,4,5],stress:5,string:0,structur:[0,1,3,4],structuregen:[3,4,5],subtend:[],summari:5,swiftcomp:[0,4,5],temperatur:5,tempscript:[],text:2,textlist:2,texttomatrix:2,theori:5,thermoelast:5,thermopiezoelectr:5,thermopiezoelectromagnet:5,thermopiezomagnet:5,timoshenko:5,trans_el:5,transform:5,trapez:5,twist:5,type:[2,3,4,5],uniform:5,util:1,vab:[0,1,4,5],vlasov:5,web:[],what:[],whether:[3,4],writ:2,write:[1,2,4],write_input:4,writeformatfloat:2,writeformatfloatsmatrix:2,writeformatinteg:2,writeformatintegersmatrix:2,writevabsel:3,writevabselementorient:3,writevabsin:3,writevabsmacrodata:3,writevabsmateri:3,writevabsmocombo:3,writevabsnod:3,written:[2,3],xem:4,xml:[0,4],xr_sg:4,zero:5},titles:["analysis Module","Welcome to Some scripts\u2019s documentation!","I/O Utility Functions","SG I/O Module for VABS","presg Module","Class Module for MSM Structure Gene"],titleterms:{"class":5,"function":[2,3],analysi:0,beam:[],code:[],cross:[],document:1,gene:5,genom:[],indic:1,materi:5,modul:[0,3,4,5],msm:5,other:[],presg:4,read:3,script:1,section:5,some:1,structur:5,tabl:1,util:2,vab:3,welcom:1,write:3}}) \ No newline at end of file +Search.setIndex({docnames:["analysis","beam","index","iogebt","ioutils","iovabs","ms_analysis","ms_module","prebeam","presg","sg","sg_module","utils"],envversion:{"sphinx.domains.c":1,"sphinx.domains.changeset":1,"sphinx.domains.cpp":1,"sphinx.domains.javascript":1,"sphinx.domains.math":2,"sphinx.domains.python":1,"sphinx.domains.rst":1,"sphinx.domains.std":1,sphinx:54},filenames:["analysis.rst","beam.rst","index.rst","iogebt.rst","ioutils.rst","iovabs.rst","ms_analysis.rst","ms_module.rst","prebeam.rst","presg.rst","sg.rst","sg_module.rst","utils.rst"],objects:{"msgpi.analysis":{run:[0,0,1,""],solve:[0,0,1,""]},"msgpi.io.iovabs":{readVABSIn:[5,0,1,""],readVABSOutHomo:[5,0,1,""],writeVABSElementOrientations:[5,0,1,""],writeVABSElements:[5,0,1,""],writeVABSIn:[5,0,1,""],writeVABSMOCombos:[5,0,1,""],writeVABSMacroData:[5,0,1,""],writeVABSMaterials:[5,0,1,""],writeVABSNodes:[5,0,1,""]},"msgpi.io.utils":{textToMatrix:[4,0,1,""],writeFormatFloats:[4,0,1,""],writeFormatFloatsMatrix:[4,0,1,""],writeFormatIntegers:[4,0,1,""],writeFormatIntegersMatrix:[4,0,1,""]},"msgpi.ms.analysis":{runGEBT:[6,0,1,""],solveGEBT:[6,0,1,""],solvePLECS:[6,0,1,""]},"msgpi.ms.beam":{Beam:[1,1,1,""],BeamSegment:[1,1,1,""]},"msgpi.ms.beam.Beam":{analysis_type:[1,2,1,""],angular_velocity:[1,2,1,""],echo:[1,3,1,""],findPtCoordByName:[1,3,1,""],findSectionByName:[1,3,1,""],frames:[1,2,1,""],linear_velocity:[1,2,1,""],max_iteration:[1,2,1,""],mconditions:[1,2,1,""],name:[1,2,1,""],num_eigens:[1,2,1,""],num_steps:[1,2,1,""],pconditions:[1,2,1,""],points:[1,2,1,""],sections:[1,2,1,""],segments:[1,2,1,""]},"msgpi.ms.beam.BeamSegment":{calcLengthSq:[1,3,1,""],coords:[1,2,1,""],css:[1,2,1,""],local_frame_id:[1,2,1,""],num_divisions:[1,2,1,""],points:[1,2,1,""],twist:[1,2,1,""]},"msgpi.ms.iogebt":{readGEBTIn:[3,0,1,""],readGEBTOut:[3,0,1,""],readGEBTOutEigen:[3,0,1,""],readGEBTOutNode:[3,0,1,""],readGEBTOutStatic:[3,0,1,""],writeGEBTIn:[3,0,1,""]},"msgpi.ms.prebeam":{preBeam:[8,0,1,""]},"msgpi.presg":{preSG1D:[9,0,1,""],preSG:[9,0,1,""],readMaterialFromXMLElement:[9,0,1,""]},"msgpi.sg":{MaterialSection:[10,1,1,""],StructureGene:[10,1,1,""]},"msgpi.sg.MaterialSection":{compliance:[10,2,1,""],compliance_refined:[10,2,1,""],constants:[10,2,1,""],density:[10,2,1,""],eff_props:[10,2,1,""],failure_criterion:[10,2,1,""],mass_center:[10,2,1,""],mass_mc:[10,2,1,""],mass_origin:[10,2,1,""],name:[10,2,1,""],shear_center:[10,2,1,""],smdim:[10,2,1,""],stiffness:[10,2,1,""],stiffness_refined:[10,2,1,""],strength:[10,2,1,""],type:[10,2,1,""]},"msgpi.sg.StructureGene":{analysis:[10,2,1,""],degen_element:[10,2,1,""],elem_orient:[10,2,1,""],elem_prop:[10,2,1,""],elementids1d:[10,2,1,""],elementids2d:[10,2,1,""],elementids3d:[10,2,1,""],elementids:[10,2,1,""],elements:[10,2,1,""],findComboByMaterialOrientation:[10,3,1,""],findMaterialByName:[10,3,1,""],fn_gmsh_msh:[10,2,1,""],global_displacements:[10,2,1,""],global_loads:[10,2,1,""],global_loads_dist:[10,2,1,""],global_loads_type:[10,2,1,""],global_rotations:[10,2,1,""],initial_curvature:[10,2,1,""],initial_twist:[10,2,1,""],materials:[10,2,1,""],mocombos:[10,2,1,""],model:[10,2,1,""],name:[10,2,1,""],nodes:[10,2,1,""],nonuniform_temperature:[10,2,1,""],num_slavenodes:[10,2,1,""],oblique:[10,2,1,""],omega:[10,2,1,""],physics:[10,2,1,""],prop_elem:[10,2,1,""],sgdim:[10,2,1,""],smdim:[10,2,1,""],summary:[10,3,1,""],trans_element:[10,2,1,""]},"msgpi.utils":{calcCab:[12,0,1,""],calcRotationTensorFromParameters:[12,0,1,""]}},objnames:{"0":["py","function","Python function"],"1":["py","class","Python class"],"2":["py","attribute","Python attribute"],"3":["py","method","Python method"]},objtypes:{"0":"py:function","1":"py:class","2":"py:attribute","3":"py:method"},terms:{"2e12":10,"2k12":10,"3x1":12,"3x3":12,"6x6":6,"class":[2,7,11],"default":10,"float":[1,3,4,6,10,12],"function":[2,6,7,11],"import":[0,1,3,4,5,6,8,9,10,12],"int":[0,1,4,5,8,9,10],"return":[1,3,4,5,6,9,10,12],"static":[3,6],"switch":6,"true":[0,4,5,6,9],SGs:8,The:[4,6,9],a_1:12,a_2:12,a_3:12,a_i:12,after:[4,9],all:4,analysi:[1,2,3,7,9,10,11],analysis_typ:1,angl:10,angular:1,angular_veloc:1,anisotrop:10,append:4,appli:6,arrai:4,b_1:12,b_2:12,b_3:12,b_j:12,basi:12,beam:[2,3,6,7,8,10],beam_xml:6,beamseg:1,bernoulli:10,between:12,blank:3,block:4,book:6,bool:[0,4,6,9],brief:10,bsid:1,c11:10,c12:10,c13:10,c21:10,c22:10,c23:10,c31:10,c32:10,c33:10,calccab:12,calcctmkeypoint:[],calclengthsq:1,calcrotationtensorfromparamet:12,calcul:[1,12],cantilev:6,carri:[0,6,9],cdot:12,center:10,charact:4,cid:10,classic:10,cmd:6,code:[0,1],combin:10,command:0,complianc:[6,10],compliance_refin:10,composit:6,condit:1,conduct:10,configur:10,connect:10,constant:10,constitut:[],construct:3,content:[2,7,11],continuum:10,convert:4,coord:1,coordin:[1,10],cosin:12,creat:8,criterion:10,cross:[1,6,8],css:1,curvatur:10,dat:3,data:[1,3,5,6,9],defualt:10,degen_el:10,dehomogen:[0,9,10],densiti:10,deprec:10,design:[0,9],desir:4,dict:[1,10],dimens:[0,9,10],dimensiona:[],direct:12,displac:[6,10],distribut:10,divis:1,e11:10,e12:10,e13:10,e22:10,e23:10,e33:10,each:[4,10],echo:1,eff_prop:10,effect:[1,10],eid:10,eigen:[1,3],elast:[6,10],elem_ori:10,elem_prop:10,element:[9,10],elementid:10,elementids1d:10,elementids2d:10,elementids3d:10,elementtre:9,end:1,engin:10,envelop:[0,9],equat:6,etre:9,eular:12,euler:10,exampl:[4,5,12],excect:0,failur:[0,9,10],failure_criterion:10,fals:9,file:[0,3,4,5,6,8,9,10],find:[1,6,10],findcombobymaterialorient:10,findmaterialbynam:10,findptcoordbynam:1,findsectionbynam:1,finit:10,first:1,flag:10,flatten:[],fmt:[4,5],fn_beam:8,fn_gebt_in:3,fn_gebt_out:3,fn_gmsh_msh:10,fn_input:6,fn_vabs_in:5,fobj:[4,5],forc:6,format:[0,4,5,9],found:10,frame:[1,12],from:[3,5,6,9,12],g12:10,g13:10,g23:10,gebt:[1,2,7],gene:[2,5,9,11],gener:[0,9,10],genom:[],given:6,global:[6,8,10],global_displac:10,global_load:10,global_loads_dist:10,global_loads_typ:10,global_rot:10,gmsh:10,going:[3,4],goint:4,height:[],hodg:6,homogen:[0,5,9,10],ids:10,includ:[6,10],index:2,indic:[0,9],initi:[0,9,10],initial_curvatur:10,initial_twist:10,input:[0,3,5,6,8,9],input_nam:0,integ:4,iogebt:3,iovab:5,isotrop:10,isotropi:10,iter:1,k11:10,k12:10,k13:10,k22:10,kei:[1,10],kirchhoff:10,label:1,left:3,length:[1,6],lenticular:[],level:10,like:1,line:[3,4],linear:1,linear_veloc:1,linearli:6,list:[1,3,4,6,8,10,12],load:[1,6,10],local:[0,1,9,10],local_frame_id:1,locat:6,love:10,m11:10,m12:10,m22:10,macroscop:[0,10],main:8,mainli:1,manual:10,mass:10,mass_cent:10,mass_mc:10,mass_origin:10,materi:[9,11],materialsect:[1,8,10],matrix:[4,6,10,12],max:1,max_iter:1,mcondit:1,member:1,mesh:10,messag:[0,9],method:12,microscop:[],mid:10,middl:[],milenkov:12,mindlin:10,mocombo:10,mode:8,model:[0,9,10],modul:2,moment:6,msg:10,msgpi:[0,1,3,4,5,6,8,9,10,12],msm:[2,11],msmio:[],n11:10,n12:10,n13:10,n22:10,n23:10,name:[0,1,3,5,6,8,9,10],newlin:4,nid1:10,nid2:10,nid:10,nodal:[3,10],node:[3,10],none:[1,10],nonlinear:6,nonuniform_temperatur:10,nu12:10,nu13:10,nu23:10,num_divis:1,num_eigen:1,num_slavenod:10,num_step:1,number:[1,3,4,10],numpi:4,object:[1,3,4,10],obliqu:10,omega:10,onli:10,option:[],orient:10,origin:10,orthotrop:10,out:[0,6,9],output:[3,4,5,6],page:2,paramet:[0,1,3,4,5,6,8,9,10,12],pars:6,pcondit:1,physic:10,piezoelectr:10,piezoelectromagnet:10,piezomagnet:10,plate:10,point:[1,6],prebeam:[2,7],pregebt:8,preprocess:[6,7],preprocessor:[8,9],presg1d:9,presg:[2,11],print:[0,1,6,9,10],prismat:6,problem:6,prop_elem:10,properti:[1,8,10],ptid:1,radian:[],radiu:[],ratio:[0,9],read:[7,9,11],readgebtin:3,readgebtout:3,readgebtouteigen:3,readgebtoutnod:3,readgebtoutstat:3,readmaterialfromxmlel:9,readvabsin:5,readvabsouthomo:5,recov:[0,9,10],refin:10,reissner:10,repres:4,result:[3,5,6],resutl:1,rodrigu:12,root:9,rotat:[1,6,10,12],run:[0,6,8],rungebt:6,s11:10,s12:10,s13:10,s22:10,s23:10,s33:10,same:3,screen:9,scrnout:[0,5,6,9],search:2,section:[1,6,8,11],see:10,segment:7,self:1,sff:5,sfi:5,sg_xml:[0,9],sgdim:10,shear:10,shear_cent:10,shell:10,sid:1,side:[],slave:10,slender:1,smdim:[0,9,10],solid:[],solv:[0,6],solvegebt:6,solveplec:6,solver:[0,9],squar:1,squre:1,start:1,step:1,stiff:10,stiffness_refin:10,store:10,str:[0,1,3,4,5,6,8,9,10,12],strain:10,strength:[0,9,10],stress:10,string:[0,5],structur:[0,1,2,5,9,11],structuregen:[5,9,10],subtend:[],summari:10,swiftcomp:[0,9,10],tabl:3,temperatur:10,tempscript:[],tensor:12,text:4,textlist:4,texttomatrix:4,theori:[6,10],thermoelast:10,thermopiezoelectr:10,thermopiezoelectromagnet:10,thermopiezomagnet:10,thi:[1,3,6],three:[6,12],timoshenko:10,tip:6,total:6,trans_el:10,transform:10,trapez:10,twist:[1,10],type:[1,3,4,5,6,9,10,12],uniform:10,used:6,using:6,util:[2,11],va1:1,va2:1,va3:1,vab:[0,2,9,10,11],veloc:1,vlasov:10,wa1:1,wa2:1,wa3:1,want:6,web:[],what:[],where:6,whether:9,wiener:12,writ:4,write:[4,7,9,11],write_input:9,writeformatfloat:4,writeformatfloatsmatrix:4,writeformatinteg:4,writeformatintegersmatrix:4,writegebtin:3,writevabsel:5,writevabselementorient:5,writevabsin:5,writevabsmacrodata:5,writevabsmateri:5,writevabsmocombo:5,writevabsnod:5,written:[3,4,5],xem:9,xml:[0,6,8,9],xr_sg:9,zero:10},titles:["analysis Module","Class Module for Beam","Welcome to Some scripts\u2019s documentation!","I/O Module for GEBT","I/O Utility Functions","SG I/O Module for VABS","analysis Module for GEBT","Structure Module","prebeam Module for GEBT","presg Module","Class Module for MSM Structure Gene","SG Module","Utility Functions"],titleterms:{"class":[1,10],"function":[3,4,5,8,12],analysi:[0,6],beam:1,code:[],cross:[],document:2,gebt:[3,6,8],gene:10,genom:[],indic:2,materi:10,modul:[0,1,3,5,6,7,8,9,10,11],msm:10,other:[],prebeam:8,preprocess:8,presg:9,read:[3,5],script:2,section:10,segment:1,some:2,structur:[7,10],tabl:2,util:[4,12],vab:5,welcom:2,write:[3,5]}}) \ No newline at end of file diff --git a/doc/build/html/sg.html b/doc/build/html/sg.html index 403fb45..33f0576 100644 --- a/doc/build/html/sg.html +++ b/doc/build/html/sg.html @@ -35,8 +35,8 @@ - - + + @@ -82,13 +82,19 @@

              Contents:

              Parameters:
                -
              • hw – Web length
              • -
              • a1 – Subtended angle (radian) of the side shell
              • -
              • a2 – Subtended angle (radian) of the middle shell
              • -
              • r1 – Radius of the side shell
              • -
              • r2 – Radius of the middle shell
              • -
              • hf – Flattened height
              • +
              • fn_beam (str) – File name of the preGEBT main input file (.xml).
              • +
              • mode (int) –

                Mode of preprocessing.

                +
                +
                  +
                • 1 - create SG (cross-section) input files
                • +
                • 2 - run SGs
                • +
                • 3 - create global 1D beam input file
                • +
                +
                +
              • +
              • sections (list(MaterialSection)) – List of sectional properties.
              +++ + + + +
              Parameters:
                +
              • rp (list(float)) – Rotation parameters (3x1).
              • +
              • method (str) –

                Rotation parameter type.

                +
                  +
                • er - Eular-Rodrigues
                • +
                • wm - Wiener-Milenkovic
                • +
                +
              • +
              +
              +
              + +
              +
              +msgpi.utils.calcCab(a, b)
              +

              Calculate the direction cosine matrix between frame a and b

              +

              \(C_{ij} = a_i\ \cdot\ b_j\)

              + +++ + + + + + + + +
              Parameters:
                +
              • a (list(float)) – List of three a basis (a_1, a_2, a_3).
              • +
              • b (list(float)) – List of three b basis (b_1, b_2, b_3).
              • +
              +
              Returns:

              3x3 matrix of the direction cosine.

              +
              Return type:

              list(list(float))

              +
              +

              Examples

              +
              >>> a = [
              +...     [1., 0., 0.],
              +...     [0., 1., 0.],
              +...     [0., 0., 1.]
              +... ]
              +>>> b = [
              +...     [],
              +...     [],
              +...     []
              +... ]
              +>>> utilities.calcCab(a, b)
              +
              +
              +
              + +
              + + +
              + +
              + + +
              +
              + + + +
              + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/source/beam.rst b/doc/source/beam.rst new file mode 100644 index 0000000..c649e85 --- /dev/null +++ b/doc/source/beam.rst @@ -0,0 +1,21 @@ +Class Module for Beam +===================== + +.. highlight:: python + +:: + + import msgpi.ms.beam + +Beam segment +------------ + +.. autoclass:: msgpi.ms.beam.BeamSegment + :members: + +Beam +---- + +.. autoclass:: msgpi.ms.beam.Beam + :members: + diff --git a/doc/source/index.rst b/doc/source/index.rst index cc41001..1fc1901 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -10,11 +10,9 @@ Welcome to Some scripts's documentation! :maxdepth: 2 :caption: Contents: - sg - iovabs - ioutils - presg - analysis + sg_module + ms_module + utils Indices and tables ================== diff --git a/doc/source/iogebt.rst b/doc/source/iogebt.rst new file mode 100644 index 0000000..c775346 --- /dev/null +++ b/doc/source/iogebt.rst @@ -0,0 +1,27 @@ +I/O Module for GEBT +=================== + +.. highlight:: python + +:: + + import msgpi.ms.iogebt + +Reading Functions +----------------- + +.. autofunction:: msgpi.ms.iogebt.readGEBTIn + +.. autofunction:: msgpi.ms.iogebt.readGEBTOut + +.. autofunction:: msgpi.ms.iogebt.readGEBTOutNode + +.. autofunction:: msgpi.ms.iogebt.readGEBTOutStatic + +.. autofunction:: msgpi.ms.iogebt.readGEBTOutEigen + +Writing Functions +----------------- + +.. autofunction:: msgpi.ms.iogebt.writeGEBTIn + diff --git a/doc/source/ms_analysis.rst b/doc/source/ms_analysis.rst new file mode 100644 index 0000000..92b2588 --- /dev/null +++ b/doc/source/ms_analysis.rst @@ -0,0 +1,16 @@ +analysis Module for GEBT +======================== + +.. highlight:: python + +:: + + import msgpi.ms.analysis + + +.. autofunction:: msgpi.ms.analysis.solveGEBT + +.. autofunction:: msgpi.ms.analysis.runGEBT + +.. autofunction:: msgpi.ms.analysis.solvePLECS + diff --git a/doc/source/ms_module.rst b/doc/source/ms_module.rst new file mode 100644 index 0000000..02e3b0c --- /dev/null +++ b/doc/source/ms_module.rst @@ -0,0 +1,11 @@ +Structure Module +================ + +.. toctree:: + :maxdepth: 2 + :caption: Contents: + + beam + iogebt + prebeam + ms_analysis diff --git a/doc/source/prebeam.rst b/doc/source/prebeam.rst new file mode 100644 index 0000000..0c2e326 --- /dev/null +++ b/doc/source/prebeam.rst @@ -0,0 +1,14 @@ +prebeam Module for GEBT +======================= + +.. highlight:: python + +:: + + import msgpi.ms.prebeam + +Preprocessing Function +---------------------- + +.. autofunction:: msgpi.ms.prebeam.preBeam + diff --git a/doc/source/sg_module.rst b/doc/source/sg_module.rst new file mode 100644 index 0000000..5017285 --- /dev/null +++ b/doc/source/sg_module.rst @@ -0,0 +1,12 @@ +SG Module +============= + +.. toctree:: + :maxdepth: 2 + :caption: Contents: + + sg + presg + iovabs + ioutils + analysis diff --git a/doc/source/utils.rst b/doc/source/utils.rst new file mode 100644 index 0000000..ba80118 --- /dev/null +++ b/doc/source/utils.rst @@ -0,0 +1,12 @@ +Utility Functions +================= + +.. highlight:: python + +:: + + import msgpi.utils + +.. autofunction:: msgpi.utils.calcRotationTensorFromParameters + +.. autofunction:: msgpi.utils.calcCab diff --git a/io/iovabs.pyc b/io/iovabs.pyc index 008f491..a138740 100644 Binary files a/io/iovabs.pyc and b/io/iovabs.pyc differ diff --git a/ms/__init__.pyc b/ms/__init__.pyc new file mode 100644 index 0000000..c607f6b Binary files /dev/null and b/ms/__init__.pyc differ diff --git a/ms/analysis.py b/ms/analysis.py index 7decb1a..9693980 100644 --- a/ms/analysis.py +++ b/ms/analysis.py @@ -9,7 +9,20 @@ def solveGEBT(beam_xml, scrnout=True): - """ Carry out a global beam analysis using GEBT + """Carry out a global beam analysis using GEBT. + + This function includes the preprocessing of the input data, + running GEBT and parsing the results. + + Parameters + ---------- + beam_xml : str + Beam xml input file. + scrnout : bool + Switch for printing GEBT cmd outputs. + + Returns + ------- """ # Preprocess @@ -31,6 +44,19 @@ def solveGEBT(beam_xml, scrnout=True): def runGEBT(fn_input, scrnout=True): + """Run GEBT analysis. + + Parameters + ---------- + fn_input : str + File name of the GEBT input. + scrnout : bool + Switch for printing GEBT cmd outputs. + + Returns + ------- + File name of the GEBT output. + """ cmd = ['gebt', fn_input] # cmd = ' '.join(cmd) @@ -60,14 +86,19 @@ def solvePLECS(length, compliance, x1, f1=0, f2=0, f3=0, m1=0, m2=0, m3=0): Nonlinear Composite Beam Theory by D. H. Hodges are used. - :param length: Total length of the beam - :type length: float - - :param compliance: The 6x6 compliance matrix of the beam cross-section - :type compliance: list of list of float - - :param x1: The location where the result is wanted. - :type x1: float + Parameters + ---------- + length : float + Total length of the beam. + compliance : list(list(float)) + The 6x6 compliance matrix of the beam cross-section. + x1 : float + The location where the result is wanted. + + Returns + ------- + list(list(float)) + Results (displacement, rotations, forces, moments). """ F = np.array([[f1, f2, f3, m1, m2, m3]]).T diff --git a/ms/analysis.pyc b/ms/analysis.pyc new file mode 100644 index 0000000..5e72cb9 Binary files /dev/null and b/ms/analysis.pyc differ diff --git a/ms/beam.py b/ms/beam.py index 80ed51f..5c38f9a 100644 --- a/ms/beam.py +++ b/ms/beam.py @@ -3,61 +3,88 @@ class BeamSegment(object): - """ Class for a beam segment. + """Class for a beam segment. """ def __init__(self): - self.points = [] #: Point labels [start, stop] - self.coords = [] #: Coordinates [[x1, x2, x3], [x1, x2, x3]] - self.css = [] #: Cross-section labels [start, stop] + #: list(int): Point labels. + #: `[starting point, ending point]` + self.points = [] + #: list(list(float)): Coordinates of starting and ending points. + #: `[[x1, x2, x3], [x1, x2, x3]]` + self.coords = [] + #: list(int): Cross-section labels. + #: `[starting, ending]` + self.css = [] self.rotate_a1 = 0.0 - self.twist = 0.0 #: Twist - # self.dihedral = 0. #: Dihedral - # self.sweep = 0. #: Sweep - self.local_frame_id = 0 #: Local frame + #: float: Twist. + self.twist = 0.0 + # self.dihedral = 0. + # self.sweep = 0. + #: int: Local frame id. + self.local_frame_id = 0 self.frame_id = 0 self.curv_id = 0 - self.num_divisions = 1 #: Number of divisions for meshing + #: int: Number of division of the segment. + self.num_divisions = 1 def calcLengthSq(self): + """Calculate the square of the segment length. + + Returns + ------- + float + Squred length of the segment. + """ return ((np.array(self.coords[0]) - np.array(self.coords[1]))**2).sum() class Beam(object): - """ A slender beam-like structure + """Class for a slender beam-like structure. This class is mainly for the GEBT code. """ def __init__(self): - self.name = '' #: Name of the beam + #: str: Name of the beam. + self.name = '' # Analysis - self.analysis_type = 0 #: Analysis type (GEBT) - self.max_iteration = 1 #: Max iteration - self.num_steps = 1 #: Number of analysis steps - self.num_eigens = 0 #: Number of eigen analysis resutls + #: int: Analysis type (GEBT). + self.analysis_type = 0 + #: int: Max iteration. + self.max_iteration = 1 + #: int: Number of analysis steps. + self.num_steps = 1 + #: int: Number of eigen analysis resutls. + self.num_eigens = 0 # Design - self.angular_velocity = [] #: Angular velocity of the rotating beam - self.linear_velocity = [] #: Linear velocity of the first key point - - #: Points - #: {ptid: [x1, x2, x3], ...} + #: list(float): Angular velocity of the rotating beam. + #: `[wa1, wa2, wa3]` + self.angular_velocity = [] + #: list(float): Linear velocity of the first key point. + #: `[va1, va2, va3]` + self.linear_velocity = [] + + #: dict(int, list(float)): Key point id and coordinates. + #: `{ptid: [x1, x2, x3], ...}` self.points = {} - #: Beam segments - #: {bsid: BeamSegment object, ...} + #: dict(int, :obj:`BeamSegment`): Beam segments + #: `{bsid: BeamSegment object, ...}` self.segments = {} - # self.divisions = [] #: Divisions of members - self.pconditions = [] #: Point conditions (B.C. and loads) - self.mconditions = [] #: Member conditions (B.C. and loads) + # self.divisions = [] # Divisions of members + #: list: Point conditions (B.C. and loads). + self.pconditions = [] + #: list: Member conditions (B.C. and loads). + self.mconditions = [] - #: Effective properties of cross-sections - #: {sid: MaterialSection object, ...} + #: dict(int, :obj:`MaterialSection`): Effective properties of cross-sections. + #: `{sid: MaterialSection object, ...}` self.sections = {} self.frames = {} #: Local self.frames @@ -69,6 +96,8 @@ def __init__(self): # self.results = None #: Results of GEBT analysis def echo(self): + """Print the beam data. + """ print('') print('Key Point Coordinates') print('='*40) @@ -86,12 +115,36 @@ def echo(self): print('') def findPtCoordByName(self, name): + """Find key point coordinates by point id. + + Parameters + ---------- + name : int + Point id. + + Returns + ------- + list(float) + Point coordinates. + """ for i, c in self.points.items(): if i == name: return c return None def findSectionByName(self, name): + """Find sectional properties by section id. + + Parameters + ---------- + name : int + Section id. + + Returns + ------- + :obj:`MaterialSection` + Sectional properties. + """ for i, s in self.sections.items(): if s.name == name: return i diff --git a/ms/beam.pyc b/ms/beam.pyc new file mode 100644 index 0000000..c8480ec Binary files /dev/null and b/ms/beam.pyc differ diff --git a/ms/iogebt.py b/ms/iogebt.py index 0d7103d..517c567 100644 --- a/ms/iogebt.py +++ b/ms/iogebt.py @@ -13,6 +13,18 @@ # ==================================================================== def readGEBTIn(fn_gebt_in): + """Read GEBT input. + + Parameters + ---------- + fn_gebt_in : str + File name of the GEBT input. + + Returns + ------- + :obj:`Beam` + Beam object constructed from the data. + """ beam = msb.Beam() # results = {} @@ -81,6 +93,20 @@ def readGEBTIn(fn_gebt_in): # -------------------------------------------------------------------- def readGEBTOutNode(lines): + """Read GEBT nodal results. + + Parameters + ---------- + lines : list(str) + File name of the GEBT output. + beam : :obj:`Beam` + Beam object. + + Returns + ------- + list(list(float)) + Table of result numbers for this node. + """ out = [] for l in lines: out += list(map(float, l.strip().split())) @@ -95,6 +121,18 @@ def readGEBTOutNode(lines): def readGEBTOutStatic(fn_gebt_out, beam): + """Read GEBT results of static analysis. + + Parameters + ---------- + fn_gebt_out : str + File name of the GEBT output. + beam : :obj:`Beam` + Beam object. + + Returns + ------- + """ flag_analysis = beam.analysis_type nstep = beam.num_steps nkp = len(beam.points) @@ -164,6 +202,18 @@ def readGEBTOutStatic(fn_gebt_out, beam): # -------------------------------------------------------------------- def readGEBTOutEigen(fn_gebt_out, beam): + """Read GEBT results of eigen analysis. + + Parameters + ---------- + fn_gebt_out : str + File name of the GEBT output. + beam : :obj:`Beam` + Beam object. + + Returns + ------- + """ # if len(gebtin) == 0: # gebtin = readGEBTIn(gebtin_name) @@ -306,6 +356,18 @@ def readGEBTOutEigen(fn_gebt_out, beam): def readGEBTOut(fn_gebt_out, beam): + """Read GEBT results. + + Parameters + ---------- + fn_gebt_out : str + File name of the GEBT output. + beam : :obj:`Beam` + Beam object + + Returns + ------- + """ flag_analysis = beam.analysis_type if flag_analysis <= 1: return readGEBTOutStatic(fn_gebt_out, beam) @@ -331,7 +393,22 @@ def readGEBTOut(fn_gebt_out, beam): # ==================================================================== def writeGEBTIn(beam, fn_gebt_in=''): - """ Write data to the GEBT input""" + """Write data to the GEBT input. + + Parameters + ---------- + beam : :obj:`Beam` + Beam object that is going to be written to file. + fn_gebt_in : str + File name of the GEBT input. + If left blank, the file name will be the same as the beam name, + i.e., `[beam.name].dat`. + + Returns + ------- + str + File name of the GEBT input. + """ if fn_gebt_in == '': fn_gebt_in = beam.name + '.dat' diff --git a/ms/iogebt.pyc b/ms/iogebt.pyc new file mode 100644 index 0000000..7ad993a Binary files /dev/null and b/ms/iogebt.pyc differ diff --git a/ms/prebeam.py b/ms/prebeam.py index 8d08dd8..91bf430 100644 --- a/ms/prebeam.py +++ b/ms/prebeam.py @@ -10,14 +10,18 @@ def preBeam(fn_beam, mode=1, sections=[]): """ Preprocessor of GEBT - :param fn_beam: File name of the PreGEBT main input file (.xml) - :type fn_beam: string - - :param mode: Mode of running - 1 - create SG (cross-section) input files - 2 - run SGs - 3 - create global 1D beam input file - :type mode: int + Parameters + ---------- + fn_beam : str + File name of the preGEBT main input file (.xml). + mode : int + Mode of preprocessing. + + * 1 - create SG (cross-section) input files + * 2 - run SGs + * 3 - create global 1D beam input file + sections : list(:obj:`MaterialSection`) + List of sectional properties. """ beam = msb.Beam() diff --git a/ms/prebeam.pyc b/ms/prebeam.pyc new file mode 100644 index 0000000..2eac118 Binary files /dev/null and b/ms/prebeam.pyc differ diff --git a/utils.py b/utils.py index 11618a2..9af9487 100644 --- a/utils.py +++ b/utils.py @@ -25,15 +25,17 @@ def tilde(v): def calcRotationTensorFromParameters(rp, method=''): - """ Calculate rotation tensor from rotation parameters + """Calculate rotation tensor from rotation parameters. - :param rp: Rotation parameters (3x1) - :type rp: list-like + Parameters + ---------- + rp : list(float) + Rotation parameters (3x1). + method : str + Rotation parameter type. - :param method: Rotation parameter type - er - Eular-Rodrigues - wm - Wiener-Milenkovic - :type method: string + * `er` - Eular-Rodrigues + * `wm` - Wiener-Milenkovic """ C = np.zeros((3, 3)) if method == 'er': @@ -129,17 +131,20 @@ def calcCab(a, b): :math:`C_{ij} = a_i\ \cdot\ b_j` - :param a: list of three a basis (a_1, a_2, a_3) - :type a: list + Parameters + ---------- + a : list(float) + List of three a basis (a_1, a_2, a_3). + b : list(float) + List of three b basis (b_1, b_2, b_3). - :param b: list of three b basis (b_1, b_2, b_3) - :type b: list - - :return: 3a3 matrix of the direction cosine - :rtype: numpy.array - - :Example: + Returns + ------- + list(list(float)) + 3x3 matrix of the direction cosine. + Examples + -------- >>> a = [ ... [1., 0., 0.], ... [0., 1., 0.], diff --git a/utils.pyc b/utils.pyc index 38be490..7b93baa 100644 Binary files a/utils.pyc and b/utils.pyc differ