Example #1
0
def create_wizard(mod):
    """Create the linear thermic wizard"""
    #    wiz = WC.Wizard(u"Linear thermal analysis", mod)
    #    wiz = WC.Wizard(u"線形熱伝導解析", mod)
    wiz = WC.Wizard(
        qt.QApplication.translate("WizardLinearThermic",
                                  "Linear thermal analysis", None,
                                  qt.QApplication.UnicodeUTF8), mod)
    WC.add_model_page(wiz, [
        WC.Mode3D,
        WC.Plane,
    ])
    exp_store = WC.ExpStore()
    exp_store.register(WC.ExpStore.smesh, SMeshExp())
    exp_store.register(WC.ExpStore.geom, GeomExp())
    WC.add_mesh_page(wiz, mod, exp_store)
    #    title = u"Thermal conductivity definition"
    #    title = u"熱伝導率の設定"
    #qt.QApplication.translate("WizardLinearThermic", "", None, qt.QApplication.UnicodeUTF8)
    title = qt.QApplication.translate("WizardLinearThermic",
                                      "Thermal conductivity definition", None,
                                      qt.QApplication.UnicodeUTF8)
    WC.add_material_page(wiz, title, [
        ThermalConductance(),
    ])
    add_imposed_temps_page(wiz)
    add_normal_streams_page(wiz)
    add_volumic_sources_page(wiz)
    WC.add_command_file_page(wiz, FinalPage(mod))
    return wiz
Example #2
0
def create_wizard(mod):
    """Create the modal analysis wizard"""
    #    wiz = WC.Wizard(u"Modal analysis", mod)
    #    wiz = WC.Wizard(u"固有値解析", mod)
    wiz = WC.Wizard(
        qt.QApplication.translate("WizardModalAnalysis", "Modal analysis",
                                  None, qt.QApplication.UnicodeUTF8), mod)
    WC.add_model_page(wiz, [
        WC.Mode3D,
        WC.PlaneStress,
        WC.PlaneStrain,
        WC.AxisSymmetric,
    ])
    exp_store = WC.ExpStore()
    exp_store.register(WC.ExpStore.smesh, SMeshExp())
    exp_store.register(WC.ExpStore.geom, GeomExp())
    WC.add_mesh_page(wiz, mod, exp_store)
    #    title = u"Young's modulus, density and Poisson ratio definitions"
    #    title = u"ヤング係数、密度とポアソン比の設定"
    #qt.QApplication.translate("WizardModalAnalysis", "", None, qt.QApplication.UnicodeUTF8)
    title = qt.QApplication.translate(
        "WizardModalAnalysis",
        "Young's modulus, density and Poisson ratio definitions", None,
        qt.QApplication.UnicodeUTF8)
    WC.add_material_page(wiz, title, [
        WC.YoungModulus(),
        WC.Density(),
        WC.PoissonRatio(),
    ])
    WC.add_boundaries_page(wiz)
    add_modes_page(wiz)
    WC.add_command_file_page(wiz, FinalPage(mod))
    return wiz
Example #3
0
    def __init__(self, mod):
        self.modellist = WCD.Model_Type_List(WCD.Analysis_Type.Modal_Analysis)
        self.itemindex = "defult"

        self.mesh = None
        self.mod = mod
        exp_store = WC.ExpStore()
        exp_store.register(WC.ExpStore.smesh, SMeshExp())
        exp_store.register(WC.ExpStore.geom, GeomExp())
        self.exp_store = exp_store
        self.grouptypesel = 0
def create_wizard(mod):
    """Create the linear static wizard"""
    #    wiz = WC.Wizard(u"Isotropic linear elastic study", mod)
    #print "Check3"
    #wiz = WC.Wizard(u"等方性線形弾性材料の応力解析", mod)
    wiz = WC.Wizard(
        qt.QApplication.translate("WizardLinearStaticPlus",
                                  "Isotropic linear elastic study", None,
                                  qt.QApplication.UnicodeUTF8), mod)
    WC.add_model_page(wiz, [
        WC.Mode3D,
        WC.PlaneStress,
        WC.PlaneStrain,
        WC.AxisSymmetric,
    ])

    #print "Check4"
    exp_store = WC.ExpStore()
    #print "Check4-1"
    #print WC.ExpStore.smesh
    #print SMeshExp()
    exp_store.register(WC.ExpStore.smesh, SMeshExp())
    #print "Check4-2"
    exp_store.register(WC.ExpStore.geom, GeomExp())
    #print "Check5"
    WC.add_mesh_page(wiz, mod, exp_store)
    #    title = u"Young's modulus and Poisson ratio definitions"
    #    title = u"ヤング係数とポアソン比の設定"
    title = qt.QApplication.translate(
        "WizardLinearStaticPlus",
        "Young's modulus and Poisson ratio definitions", None,
        qt.QApplication.UnicodeUTF8)
    WC.add_material_page(wiz, title, [
        WC.YoungModulus(),
        WC.PoissonRatio(),
    ])
    WC.add_boundaries_page(wiz)
    print "Check Boundaries"
    add_loadvertex_page(wiz)
    print "Check LoadVertex"
    add_loadedge_page(wiz)
    print "Check LoadEdge"
    add_loadface_page(wiz)
    print "Check LoadFace"
    add_pressure_page(wiz)
    print "Check Pressure"
    WC.add_command_file_page(wiz, FinalPage(mod))
    print "Check CommandFile"
    #print "Check6"
    return wiz
Example #5
0
 def __init__(self,mod):
     self.modellist = WCD.Model_Type_List(WCD.Analysis_Type.Linear_Elatic)
     self.itemindex = "defult"
     
     self.mesh = None
     self.mod = mod
     exp_store = WC.ExpStore()
     exp_store.register(WC.ExpStore.smesh, SMeshExp())
     exp_store.register(WC.ExpStore.geom, GeomExp())
     self.exp_store = exp_store
     self.grouptypesel = 0 #0表示不可用,1使用几何,2使用网格
     self.material_names = ["defult"]
     self.checklists = [] #作为二维数组使用 每行的第一个数据仅站位使用,无实际意义 任何时候都不应该使用self.checklists[i][0]的数据,目的是为了与conds数据对齐,使用方便
     self.conds = []
def Creat_Boundary_Pressure_Conditions_DockWdg(mod):
   desktop = mod.give_qtwid()
   if desktop is None:
    mess = "This script needs to be run from the Salome GUI menu " \
           "by using 'File -> Load Script'."
    raise ValueError(mess)
   else:
    dockwdg = WC.CustomDockWidget(u"Isotropic linear elastic study", u"Boundaries Pressure conditions", desktop)
    dockwdg.setWindowTitle("Boundaries Pressure conditions")
    exp_store = WC.ExpStore()
    exp_store.register(WC.ExpStore.smesh, SMeshExp())
    exp_store.register(WC.ExpStore.geom, GeomExp())
    exp_store.use(WC.ExpStore.geom)
    exp = exp_store.give_exp("pressure")
    boundarywdg = WC.Bounaries_Conditions_Wdg(mod,exp,u"pressure",dockwdg)
    dockwdg.setCenterWidget(boundarywdg)
    desktop.addDockWidget(qtc.Qt.RightDockWidgetArea,dockwdg)
Example #7
0
def create_wizard(mod):
    """Create the modal analysis wizard"""
    wiz = WC.Wizard(u"Modal analysis", mod)

    ###################Page1##########################################

    add_model_Npage(wiz, [
        ((WC.Mode3DV, True), []),
        ((WC.PlaneStress, True), []),
        ((WC.PlaneStrain, True), []),
        ((WC.AxisSymmetric, True), []),
        ((WC.Ele_filaire, False), [((WC.POU_D_E, True), []),
                                   ((WC.POU_D_T, True), [])]),
        ((WC.Ele_surface, False), [((WC.DKT, True), []), ((WC.DST, True), []),
                                   ((WC.COQUE_3D, True), [])]),
    ])

    #################Page2#############################################
    exp_store = WC.ExpStore()
    exp_store.register(WC.ExpStore.smesh, SMeshExp())
    exp_store.register(WC.ExpStore.geom, GeomExp())

    WC.add_mesh_page(wiz, mod, exp_store)

    ################Page3##############################################
    add_cara_page(wiz)

    ################Page4##############################################
    title = qt.QApplication.translate(
        "", u"Young's modulus, density and Poisson ratio definitions", None,
        qt.QApplication.UnicodeUTF8)
    WC.add_material_page(wiz, title, [
        WC.YoungModulus(),
        WC.Density(),
        WC.PoissonRatio(),
    ])
    ################Page5##############################################
    add_boundariesES_page(wiz)
    ################Page6##############################################
    add_mode_page(wiz)

    WC.add_command_file_page(wiz, FinalPage(mod))
    return wiz
def create_wizard(mod):
    """Create the linear static wizard"""
    wiz = WC.Wizard(u"Isotropic linear elastic study", mod)
    WC.add_model_page(wiz, [
        WC.Mode3D,
        WC.PlaneStress,
        WC.PlaneStrain,
        WC.AxisSymmetric,
        ])

    exp_store = WC.ExpStore()
    exp_store.register(WC.ExpStore.smesh, SMeshExp())
    exp_store.register(WC.ExpStore.geom, GeomExp())
    WC.add_mesh_page(wiz, mod, exp_store)
    title = u"Young's modulus and Poisson ratio definitions"
    WC.add_material_page(wiz, title, [
        WC.YoungModulus(),
        WC.PoissonRatio(),
    ])
    WC.add_boundaries_page(wiz)
    add_pressure_page(wiz)
    WC.add_command_file_page(wiz, FinalPage(mod))
    return wiz