This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

channel flow and ER_2Coupled

0 votes

Hello,

I dowloaded the cbc.pdesys-1.0.0 package and ran the turbulent channel simulations successfully for all models except for the elliptic relaxation model.
Here are the changes I made in the turbulent_channel.py file:

# Set up turbulence model ##
#rans_parameters['omega'].default_factory = lambda : 0.6
#problem_parameters['turbulence_model'] = 'OriginalV2F'
#rans_parameters['omega'].default_factory = lambda : 0.25 
#problem_parameters['turbulence_model'] = 'LienKalizin'
#Turb_solver = ransmodels.V2F_2Coupled(problem, rans_parameters,
#                      model=problem_parameters['turbulence_model'])

#problem_parameters['turbulence_model'] = 'StandardKE'
#Turb_solver = ransmodels.StandardKE_Coupled(problem, rans_parameters,
#                        model=problem_parameters['turbulence_model'])

#problem_parameters['turbulence_model'] = "LaunderSharma"
#Turb_solver = ransmodels.LowReynolds_Segregated(problem, rans_parameters,
                        #model=problem_parameters['turbulence_model'])
#Turb_solver = ransmodels.LowReynolds_Coupled(problem, rans_parameters,
#                        model=problem_parameters['turbulence_model'])

#Turb_solver = ransmodels.SpalartAllmaras(problem, rans_parameters)

problem_parameters['turbulence_model'] = 'LRR-IP'
Turb_solver = ransmodels.ER_2Coupled(problem, rans_parameters)

here is the message I obtain:


AttributeError Traceback (most recent call last)
/usr/lib/python2.7/dist-packages/IPython/utils/py3compat.pyc in execfile(fname, *where)
176 else:
177 filename = fname
--> 178 builtin.execfile(filename, *where)

/home/celine/Fenics/cbc.pdesys-1.0.0/cbc/cfd/ransmodels/demo/turbulent_channel_LS_coupled_other.py in ()
116
117 problem_parameters['turbulence_model'] = 'LRR-IP'
--> 118 Turb_solver = ransmodels.ER_2Coupled(problem, rans_parameters)
119
120 ## solve the problem ##

/home/celine/Fenics/cbc.pdesys-1.0.0/cbc/cfd/ransmodels/ER_2Coupled.pyc in init(self, problem, parameters)
19 system_composition=[['k', 'e'], ['Rij', 'Fij']],
20 problem=problem,
---> 21 parameters=parameters)
22
23 def define(self):

/home/celine/Fenics/cbc.pdesys-1.0.0/cbc/cfd/ransmodels/ER.pyc in init(self, system_composition, problem, parameters)
22 parameters['space']['Rij'] = TensorFunctionSpace
23 parameters['space']['Fij'] = TensorFunctionSpace
---> 24 self.dim = problem.NS_problem.mesh.geometry().dim()
25 # When symmetric tensors is possible:
26 #parameters['symmetry']['Rij'] = dict(((i,j), (j,i))

AttributeError: channel instance has no attribute 'NS_problem'

It seems to come from the dim parameter. Can someone help me?

asked Feb 2, 2016 by em1604 FEniCS Novice (120 points)
...