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

Go to the source code of this file.

Namespaces

 atest-ufem-particles-taylor-green
 

Functions

def create_mesh (domain, segments)
 

Variables

tuple env = cf.Core.environment()
 
int nu = 1
 
int segs = 32
 
float D = 0.5
 
int Vs = 1
 
int Ua = 0
 
int Va = 0
 
float tau = 0.25
 
int beta = 3
 
float dt = 0.1
 
int numsteps = 100
 
int write_interval = 50
 
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 tg_solver = solver.add_unsteady_solver('cf3.UFEM.particles.TaylorGreen')
 
tuple eq_euler = solver.add_unsteady_solver('cf3.UFEM.particles.EquilibriumEuler')
 
tuple conv = solver.add_unsteady_solver('cf3.UFEM.particles.EquilibriumEulerConvergence')
 
tuple particle_c = solver.add_unsteady_solver('cf3.UFEM.particles.ParticleConcentration')
 
tuple mesh = create_mesh(domain, segs)
 
 lss = eq_euler.LSS
 
tuple ic_c = solver.InitialConditions.create_initial_condition(builder_name = 'cf3.UFEM.InitialConditionConstant', field_tag = 'particle_concentration')
 
tuple ic_tau = solver.InitialConditions.create_initial_condition(builder_name = 'cf3.UFEM.InitialConditionConstant', field_tag = 'ufem_particle_relaxation_time')
 
tuple series_writer = solver.TimeLoop.create_component('TimeWriter', 'cf3.solver.actions.TimeSeriesWriter')
 
tuple writer = series_writer.create_component('Writer', 'cf3.mesh.VTKXML.Writer')
 
tuple time = model.create_time()
 
tuple ufem_velocity = np.array(mesh.geometry.ufem_particle_velocity)
 
tuple tg_particle_velocity = np.array(mesh.geometry.taylor_green)
 
tuple err_array = np.abs(ufem_velocity-tg_particle_velocity[:,2:4])
 
tuple error_fd = mesh.geometry.create_field(name = 'error_field', variables = 'VelocityError[vector]')
 
list err_row = error_fd[i]
 
Send comments to:
COOLFluiD Web Admin