Exemplo n.º 1
0
  model = receiver.Receiver.load("example-receiver.hdf5")

  # Load some customized solution parameters
  # These are all optional, all the solvers have default values
  # for parameters not provided by the user
  params = sample_parameters()

  # Define the thermal solver to use in solving the heat transfer problem
  thermal_solver = thermal.FiniteDifferenceImplicitThermalSolver(
      params["thermal"])
  # Define the structural solver to use in solving the individual tube problems
  structural_solver = structural.PythonTubeSolver(params["structural"])
  # Define the system solver to use in solving the coupled structural system
  system_solver = system.SpringSystemSolver(params["system"])
  # Damage model to use in calculating life
  damage_model = damage.TimeFractionInteractionDamage()

  # Load the materials
  fluid = library.load_fluid("salt", "base")
  thermal, deformation, damage = library.load_material("740H", "base", 
      "elastic_model", "base")
  
  # The solution manager
  solver = managers.SolutionManager(model, thermal_solver, thermal, fluid,
      structural_solver, deformation, damage, system_solver, damage_model, 
      pset = params)

  # Heuristics would go here

  # Report the best-estimate life of the receiver 
  life = solver.solve_life()
Exemplo n.º 2
0
        'nthreads'] = 4  # Solve will run in multithreaded mode, set to number of available cores
    params['system'][
        'atol'] = 1.0e-4  # During the standby very little happens, lower the atol to accept this result

    # Choose the solvers, i.e. how we are going to solve the thermal,
    # single tube, structural system, and damage calculation problems.
    # Right now there is only one option for each
    # Define the thermal solver to use in solving the heat transfer problem
    thermal_solver = thermal.FiniteDifferenceImplicitThermalSolver(
        params["thermal"])
    # Define the structural solver to use in solving the individual tube problems
    structural_solver = structural.PythonTubeSolver(params["structural"])
    # Define the system solver to use in solving the coupled structural system
    system_solver = system.SpringSystemSolver(params["system"])
    # Damage model to use in calculating life
    damage_model = damage.TimeFractionInteractionDamage(params['damage'])

    # The solution manager
    solver = managers.SolutionManager(model,
                                      thermal_solver,
                                      thermal_mat,
                                      fluid_mat,
                                      structural_solver,
                                      deformation_mat,
                                      damage_mat,
                                      system_solver,
                                      damage_model,
                                      pset=params)

    # Actually solve for life
    life = solver.solve_life()
Exemplo n.º 3
0
  model = receiver.Receiver.load("example-receiver.hdf5")

  # Load some customized solution parameters
  # These are all optional, all the solvers have default values
  # for parameters not provided by the user
  params = sample_parameters()

  # Define the thermal solver to use in solving the heat transfer problem
  thermal_solver = thermal.FiniteDifferenceImplicitThermalSolver(
      params["thermal"])
  # Define the structural solver to use in solving the individual tube problems
  structural_solver = structural.PythonTubeSolver(params["structural"])
  # Define the system solver to use in solving the coupled structural system
  system_solver = system.SpringSystemSolver(params["system"])
  # Damage model to use in calculating life
  damage_model = damage.TimeFractionInteractionDamage(params["damage"])

  # Load the materials
  fluid = library.load_fluid("salt", "base")
  thermal, deformation, damage = library.load_material("740H", "base", 
      "elastic_model", "base")
  
  # The solution manager
  solver = managers.SolutionManager(model, thermal_solver, thermal, fluid,
      structural_solver, deformation, damage, system_solver, damage_model, 
      pset = params)

  # Reset the temperatures each night
  solver.add_heuristic(managers.CycleResetHeuristic())

  # Report the best-estimate life of the receiver