code_aster.Modelings.Tridimensional)
monModel.build()

YOUNG = 200000.0
POISSON = 0.3

acier = DEFI_MATERIAU(ELAS=_F(
    E=YOUNG,
    NU=POISSON,
), )

affectMat = code_aster.MaterialField(monMaillage)
affectMat.addMaterialsOnMesh(acier)
affectMat.buildWithoutExternalVariable()

charMeca1 = code_aster.KinematicsMechanicalLoad()
charMeca1.setModel(monModel)
charMeca1.addImposedMechanicalDOFOnCells(
    code_aster.PhysicalQuantityComponent.Dx, 0., "COTE_B")
charMeca1.addImposedMechanicalDOFOnCells(
    code_aster.PhysicalQuantityComponent.Dy, 0., "COTE_B")
charMeca1.addImposedMechanicalDOFOnCells(
    code_aster.PhysicalQuantityComponent.Dz, 0., "COTE_B")
charMeca1.build()

charMeca2 = code_aster.KinematicsMechanicalLoad()
charMeca2.setModel(monModel)
charMeca2.addImposedMechanicalDOFOnCells(
    code_aster.PhysicalQuantityComponent.Dy, 0.1, "COTE_H")
charMeca2.addImposedMechanicalDOFOnCells(
    code_aster.PhysicalQuantityComponent.Dz, 0.1, "COTE_H")
示例#2
0
model.debugPrint(rank+30)

acier = DEFI_MATERIAU(ELAS = _F(E = 2.e11,
                                NU = 0.3,),)
acier.debugPrint(8)

affectMat = code_aster.MaterialField(pMesh)

testMesh2 = affectMat.getMesh()
test.assertEqual(testMesh2.getType(), "MAILLAGE_P")

affectMat.addMaterialsOnMesh(acier)
affectMat.buildWithoutExternalVariable()

charCine = code_aster.KinematicsMechanicalLoad()
charCine.setModel(model)
charCine.addImposedMechanicalDOFOnNodes(code_aster.PhysicalQuantityComponent.Dx, 0., "COTE_B")
charCine.build()

study = code_aster.StudyDescription(model, affectMat)
dProblem = code_aster.DiscreteProblem(study)
matr_elem = dProblem.computeMechanicalStiffnessMatrix()

monSolver = code_aster.MumpsSolver(code_aster.Renumbering.Metis)

numeDDL = code_aster.ParallelDOFNumbering()
numeDDL.setElementaryMatrix(matr_elem)
numeDDL.computeNumbering()
numeDDL.debugPrint(rank+30)
示例#3
0
monModel.build()

YOUNG = 200000.0
POISSON = 0.3

acier = DEFI_MATERIAU(ELAS=_F(
    E=YOUNG,
    NU=POISSON,
), )
#acier.debugPrint(6)

affectMat = code_aster.MaterialField(monMaillage)
affectMat.addMaterialsOnMesh(acier)
affectMat.buildWithoutExternalVariable()

kine1 = code_aster.KinematicsMechanicalLoad()
kine1.setModel(monModel)
kine1.addImposedMechanicalDOFOnCells(code_aster.PhysicalQuantityComponent.Dx,
                                     0., "Bas")
kine1.addImposedMechanicalDOFOnCells(code_aster.PhysicalQuantityComponent.Dy,
                                     0., "Bas")
kine1.addImposedMechanicalDOFOnCells(code_aster.PhysicalQuantityComponent.Dz,
                                     0., "Bas")
kine1.build()
test.assertEqual(kine1.getType(), "CHAR_CINE_MECA")

kine2 = code_aster.KinematicsMechanicalLoad()
kine2.setModel(monModel)
kine2.addImposedMechanicalDOFOnCells(code_aster.PhysicalQuantityComponent.Dz,
                                     0.1, "Haut")
kine2.build()