예제 #1
0
                                 'VO2',
                                 'WO2',
                                 'UO3',
                                 'VO3',
                                 'WO3',
                                 'WO',
                                 'WI1',
                                 'WO1',
                             ))

MVECTUC = ArrayOfComponents(phys=PHY.VDEP_C, locatedComponents=NDEPLAC)
MVECTUR = ArrayOfComponents(phys=PHY.VDEP_R, locatedComponents=DDL_MECA)
MMATUUC = ArrayOfComponents(phys=PHY.MDEP_C, locatedComponents=NDEPLAC)
MMATUUR = ArrayOfComponents(phys=PHY.MDEP_R, locatedComponents=DDL_MECA)

CABSCUR.setName('CABSCUR')
CCAORIE.setName('CCAORIE')
NDEPLAC.setName('NDEPLAC')
DDL_MECA.setName('DDL_MECA')
MVECTUC.setName('MVECTUC')
MVECTUR.setName('MVECTUR')
MMATUUR.setName('MMATUUR')
MMATUUC.setName('MMATUUC')


class MET3SEG3(Element):
    """Please document this element"""
    meshType = MT.SEG3
    elrefe = (ElrefeLoc(
        MT.SE3,
        gauss=(
예제 #2
0
    def test07_element(self):
        """check Element object"""
        from cataelem.Tools.base_objects import LocatedComponents
        from cataelem.Tools.base_objects import Element
        from cataelem.Commons.mesh_types import SEG2
        from cataelem.Commons.physical_quantities import DEPL_R, SIEF_R
        from cataelem.Options.options import OP
        # build of OP should have named their own parameters (not shared)
        self.assertEqual(OP.SIEQ_ELGA.PCONTEQ.name, 'PCONTEQ')
        self.assertEqual(OP.EXISTE_DDL.PDEPL_R.name, 'PDEPL_R')

        DDL_MECA = LocatedComponents(phys=DEPL_R,
                                     type='ELNO',
                                     components=(
                                         'DX',
                                         'DY',
                                         'LAGS_C',
                                     ))
        DDL_MECA.setName('DDL_MECA')
        self.assertEqual(DDL_MECA.name, "DDL_MECA")
        ECONTPG = LocatedComponents(phys=SIEF_R,
                                    type='ELGA',
                                    location='RIGI',
                                    components=(
                                        'SIXX',
                                        'SIYY',
                                        'SIZZ',
                                        'SIXY',
                                        'SIXZ',
                                        'SIYZ',
                                    ))
        ECONTPG.setName('ECONTPG')
        self.assertEqual(ECONTPG.name, "ECONTPG")

        class ELE4TEST(Element):
            """This is a test element"""
            meshType = SEG2
            calculs = (
                OP.SIEQ_ELGA(
                    te=50,
                    para_out=((OP.SIEQ_ELGA.PCONTEQ, ECONTPG), ),
                ),
                OP.EXISTE_DDL(
                    te=99,
                    para_out=((OP.EXISTE_DDL.PDEPL_R, DDL_MECA), ),
                ),
            )

        elt = ELE4TEST()
        elt.setName('ELE4TEST')
        self.assertEqual(elt.name, 'ELE4TEST')
        opts = elt.getCalculs()
        self.assertEqual(len(opts), 2)
        self.assertEqual(opts[1][0], 'EXISTE_DDL')
        used = elt.usedLocatedComponents()
        self.assertEqual(len(used), 2)
        self.assertIn(DDL_MECA, used)
        self.assertSequenceEqual(used[1].components, ('DX', 'DY', 'LAGS_C'))
        elt.changeComponents('DDL_MECA', ('DX', 'DZ', 'TEMP'))
        used = elt.usedLocatedComponents()
        self.assertEqual(len(used), 2)
        self.assertNotIn(DDL_MECA, used)
        new = used[1]
        self.assertEqual(new.name, 'DDL_MECA')
        self.assertIn('DX', new.components)
        self.assertIn('DZ', new.components)
        self.assertNotIn('LAGS_C', new.components)
예제 #3
0
    #----------------
    DDL_THER = LocatedComponents(phys=PHY.TEMP_R,
                                 type='ELNO',
                                 diff=True,
                                 components=(
                                     ('EN1', ('LAGR', )),
                                     ('EN2', (cmp, )),
                                 ))

    MVECTTR = ArrayOfComponents(phys=PHY.VTEM_R, locatedComponents=DDL_THER)

    MMATTTR = ArrayOfComponents(phys=PHY.MTEM_R, locatedComponents=DDL_THER)

    #     Attention : il faut nommer explicitement TOUS les modes locaux crees dans la boucle
    #     --------------------------------------------------------------------
    DDL_THER.setName('DDL_THER')
    MVECTTR.setName('MVECTTR')
    MMATTTR.setName('MMATTTR')

    name = ('D_TEMP_R_' + cmp)[:16]

    class TempClass(Element):
        """Please document this element"""
        _name = name

        meshType = MT.SEG3
        nodes = (
            SetOfNodes('EN1', (
                2,
                3,
            )),
예제 #4
0
    NDEPLAC = LocatedComponents(phys=PHY.DEPL_C,
                                type='ELNO',
                                diff=True,
                                components=(
                                    ('EN1', ('LAGR', )),
                                    ('EN2', (cmp, )),
                                ))

    MVECTUR = ArrayOfComponents(phys=PHY.VDEP_R, locatedComponents=DDL_MECA)
    MVECTUC = ArrayOfComponents(phys=PHY.VDEP_C, locatedComponents=NDEPLAC)

    MMATUUR = ArrayOfComponents(phys=PHY.MDEP_R, locatedComponents=DDL_MECA)

    #     Attention : il faut nommer explicitement TOUS les modes locaux crees dans la boucle
    #     --------------------------------------------------------------------
    DDL_MECA.setName('DDL_MECA')
    NDEPLAC.setName('NDEPLAC')
    MVECTUR.setName('MVECTUR')
    MVECTUC.setName('MVECTUC')
    MMATUUR.setName('MMATUUR')

    name = 'D_DEPL_R_' + cmp

    class TempClass(Element):
        """Please document this element"""
        _name = name

        meshType = MT.SEG3
        nodes = (
            SetOfNodes('EN1', (
                2,