Exemple #1
0
FindNeighbours()

model_part.Properties[1].SetValue(CONSTITUTIVE_LAW, Isotropic2D())
print("Linear elastic model selected")

print(model_part)
print(model_part.Properties)

# the buffer size should be set up here after the mesh is read for the first time
model_part.SetBufferSize(3)

# importing the rotational dofs degrees of freedom if necessary
RotationalDofs()

# importing the solver files
SolverType.AddDofs(model_part)
solver = SolverType.StaticStructuralSolver(model_part, domain_size)
solver.structure_linear_solver = ParallelSkylineLUFactorizationSolver()

CT = Kratos_Structural_Application_var.Convergence_Tolerance
AT = Kratos_Structural_Application_var.Absolute_Tolerance

if (Kratos_Structural_Application_var.Convergence_Criteria ==
        "Displacement_Criteria"):
    solver.conv_criteria = DisplacementCriteria(CT, AT)
elif (Kratos_Structural_Application_var.Convergence_Criteria ==
      "Residual_Criteria"):
    solver.conv_criteria = ResidualCriteria(CT, AT)
elif (Kratos_Structural_Application_var.Convergence_Criteria == "And_Criteria"
      ):
    Displacement = DisplacementCriteria(CT, AT)
Exemple #2
0
        node.AddDof(ROTATION_Y)
        node.AddDof(ROTATION_Z)

# importing the solver files
if(Kratos_Structural_Application_var.SolverType == "StaticSolver"):
    structural_solver_static.AddDofs(model_part)
    solver = structural_solver_static.StaticStructuralSolver(model_part, domain_size)
elif(Kratos_Structural_Application_var.SolverType == "DynamicSolver"):
    if(Kratos_Structural_Application_var.Rotational_Dofs == "False"):
        structural_solver_dynamic.AddDofs(model_part)
        solver = structural_solver_dynamic.DynamicStructuralSolver(model_part, domain_size)
    else:
        structural_solver_dynamic_rotation.AddDofs(model_part)
        solver = structural_solver_dynamic_rotation.DynamicStructuralSolver(model_part, domain_size)
elif(Kratos_Structural_Application_var.SolverType == "ParallelSolver"):
    structural_solver_static_parallel.AddDofs(model_part)
    solver = structural_solver_static_parallel.StaticStructuralSolver(model_part, domain_size)
elif(Kratos_Structural_Application_var.SolverType == "ArcLengthSolver"):
    structural_solver_static_arc_length.AddDofs(model_part)
    solver = structural_solver_static_arc_length.StaticStructuralSolver(model_part, domain_size)
    model_part.ProcessInfo[LAMNDA] = 0.00;
elif(Kratos_Structural_Application_var.SolverType == "LineSearchesSolver"):
    structural_solver_static_general.AddDofs(model_part)
    solver = structural_solver_static_general.StaticStructuralSolver(model_part, domain_size)

# choosing the default value for the constitutive law
if(domain_size == 2):
    for prop in model_part.Properties:
        prop.SetValue(CONSTITUTIVE_LAW, PlaneStressJ2())  # Isotropic2D() )#PlaneStressJ2()
        prop.SetValue(DENSITY, 2700.0000);
        prop.SetValue(POISSON_RATIO, 0.3);