6 env = cf.Core.environment()
9 env.options().set(
'assertion_throws',
False)
10 env.options().set(
'assertion_backtrace',
False)
11 env.options().set(
'exception_backtrace',
False)
12 env.options().set(
'regist_signal_handlers',
False)
13 env.options().set(
'log_level', 1)
17 domain = model.create_domain()
18 physics = model.create_physics(
'cf3.UFEM.NavierStokesPhysics')
19 solver = model.create_solver(
'cf3.UFEM.Solver')
20 hc = solver.add_direct_solver(
'cf3.UFEM.HeatConductionSteady')
23 generator = domain.create_component(
'generator',
'cf3.mesh.BlockMesh.ChannelGenerator')
24 generator.options().set(
'mesh', cf.URI(
'//HotModel/Domain/mesh'))
25 generator.options().set(
'x_segments', 64)
26 generator.options().set(
'cell_overlap', 1)
29 hc.options().set(
'regions', [domain.access_component(
'mesh/topology').
uri()])
32 bc = hc.get_child(
'BoundaryConditions')
33 bc.add_constant_bc(region_name =
'left', variable_name =
'Temperature')
34 bc.add_constant_bc(region_name =
'right', variable_name =
'Temperature')
35 bc.get_child(
'BCleftTemperature').options().set(
'value', 10)
36 bc.get_child(
'BCrightTemperature').options().set(
'value', 35)
42 model.print_timing_tree()
45 domain.write_mesh(cf.URI(
'atest-ufem-heat3d-channel_output.pvtu'))
boost::python::object create_component(ComponentWrapper &self, const std::string &name, const std::string &builder_name)
common::URI uri(ComponentWrapper &self)