6 env = cf.Core.environment()
13 domain = model.create_domain()
14 physics = model.create_physics(
'cf3.UFEM.NavierStokesPhysics')
15 solver = model.create_solver(
'cf3.UFEM.Solver')
16 grad = solver.add_direct_solver(
'cf3.UFEM.VelocityGradient')
19 generator = domain.create_component(
'generator',
'cf3.mesh.BlockMesh.ChannelGenerator')
20 generator.options().set(
'mesh', cf.URI(
'//GradModel/Domain/mesh'))
21 generator.options().set(
'x_segments', 64)
22 generator.options().set(
'cell_overlap', 1)
28 grad.regions = [mesh.topology.uri()]
29 solver.create_fields()
31 velocity = mesh.geometry.navier_stokes_u_solution
32 coords = mesh.geometry.coordinates
33 for i
in range(len(coords)):
44 model.print_timing_tree()
47 domain.write_mesh(cf.URI(
'velocitygradient_output.pvtu'))
boost::python::object create_component(ComponentWrapper &self, const std::string &name, const std::string &builder_name)