COOLFluiD  Release kernel
COOLFluiD is a Collaborative Simulation Environment (CSE) focused on complex MultiPhysics simulations.
Namespaces | Variables
atest-ufem-particles-burgers.py File Reference

Go to the source code of this file.

Namespaces

 atest-ufem-particles-burgers
 

Variables

tuple env = cf.Core.environment()
 
float rho_f = 0.9
 
float mu = 0.19e-4
 
float r0 = 0.01
 
int omega0 = 18
 
int g = 10
 
float dt = 0.1
 
int numsteps = 5
 
int write_interval = 50
 
int resolution = 64
 
list diams = [20.e-6, 40.e-6, 80.e-6]
 
list volumes = [4./3.*pi*(d/2.)**3 for d in diams]
 
int ref_vol = 1
 
list c_reduced = [1, 1., 1.]
 
list zeta = [v/ref_vol*c for (v,c) in zip(volumes,c_reduced)]
 
tuple model = cf.Core.root()
 
tuple domain = model.create_domain()
 
tuple physics = model.create_physics('cf3.UFEM.NavierStokesPhysics')
 
tuple solver = model.create_solver('cf3.UFEM.Solver')
 
tuple polydisp = solver.add_unsteady_solver('cf3.UFEM.particles.Polydisperse')
 
tuple mesh = domain.create_component('Mesh', 'cf3.mesh.Mesh')
 
float x_min = -0.09
 
float x_max = 0.2
 
float y_min = -0.2
 
float y_max = 0.2
 
 x_segs = resolution
 
 y_segs = resolution
 
int z_segs = 2
 
tuple blocks = domain.create_component('blocks', 'cf3.mesh.BlockMesh.BlockArrays')
 
tuple points = blocks.create_points(dimensions = 2, nb_points = 4)
 
tuple block_nodes = blocks.create_blocks(1)
 
tuple block_subdivs = blocks.create_block_subdivisions()
 
tuple gradings = blocks.create_block_gradings()
 
tuple left_patch = blocks.create_patch_nb_faces(name = 'left', nb_faces = 1)
 
tuple bottom_patch = blocks.create_patch_nb_faces(name = 'bottom', nb_faces = 1)
 
tuple top_patch = blocks.create_patch_nb_faces(name = 'top', nb_faces = 1)
 
tuple right_patch = blocks.create_patch_nb_faces(name = 'right', nb_faces = 1)
 
tuple partitioner = domain.create_component('Partitioner', 'cf3.mesh.actions.PeriodicMeshPartitioner')
 
tuple link_horizontal = partitioner.create_link_periodic_nodes()
 
tuple link_front_back = partitioner.create_link_periodic_nodes()
 
tuple series_writer = solver.TimeLoop.create_component('TimeWriter', 'cf3.solver.actions.TimeSeriesWriter')
 
tuple writer = series_writer.create_component('Writer', 'cf3.mesh.VTKXML.Writer')
 
list u_arr = ['-((1 - exp(-(x^2 + y^2)/{r0}^2))*{omega0}*{r0}^2*y)/(2.*(x^2 + y^2))'.format(r0=r0,omega0=omega0), '((1 - exp(-(x^2 + y^2)/{r0}^2))*{omega0}*{r0}^2*x)/(2.*(x^2 + y^2))'.format(r0=r0,omega0=omega0), '0']
 
tuple ic_u = solver.InitialConditions.create_initial_condition(builder_name = 'cf3.UFEM.InitialConditionFunction', field_tag = 'navier_stokes_u_solution')
 
tuple ic_lin_u = solver.InitialConditions.create_initial_condition(builder_name = 'cf3.UFEM.InitialConditionFunction', field_tag = 'linearized_velocity')
 
tuple ic_g = solver.InitialConditions.create_initial_condition(builder_name = 'cf3.UFEM.InitialConditionConstant', field_tag = 'body_force')
 
string zeta_name = 'zeta_'
 
string c_name = 'c_'
 
tuple time = model.create_time()
 
Send comments to:
COOLFluiD Web Admin