dolfin version for pdesys

Asked by Zeljka Tutek on 2011-12-06

Hi there!
Which version of dolfin does pdesys code need?
Thanks,
Zeljka

Question information

Language:
English Edit question
Status:
Answered
For:
CBC.PDESys Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:

It should work with a recent version dolfin (probably newer than 0.9.10). I use the development version.

Mikael

Zeljka Tutek (zeljkat) said : #2

With the current development version /problems/Lshape.py works, but /ransmodels/turbulent_channel.py doesn't.
Zeljka

Hi,

Try pulling the latest version of pdesys and it should work. It had been a
while since I tested the rans models and an error had sneaked into the
Eikonal solver. Note that as of the moment the rans models only work for
single processors.

Mikael

On 7 December 2011 19:41, Zeljka Tutek <<email address hidden>
> wrote:

> Question #181062 on CBC.PDESys changed:
> https://answers.launchpad.net/cbcpdesys/+question/181062
>
> Zeljka Tutek posted a new comment:
> With the current development version /problems/Lshape.py works, but
> /ransmodels/turbulent_channel.py doesn't.
> Zeljka
>
> --
> You received this question notification because you are an answer
> contact for CBC.PDESys.
>

Zeljka Tutek (zeljkat) said : #4

I still have error:

In [9]: run turbulent_channel.py
Set the environment variable CBCRANS to control the location of stored results
Building mapping between periodic degrees of freedom.
Extracting matching degrees of freedom for sub space 0.
Extracting matching degrees of freedom for sub space 0.
Extracting matching degrees of freedom for sub space 1.
Extracting matching degrees of freedom for sub space 1.
Adding PDESubSystem: Steady_Coupled_1
Adding ['linear_solver']['up'] = lu to pdesubsystem up
Adding ['iteration_type'] = Newton to pdesubsystem up
Adding stabilization for constant nu
Setting parameters for standard K-Epsilon model
Adding PDESubSystem: Eikonal_1
Adding ['linear_solver']['y'] = lu to pdesubsystem y
Adding ['iteration_type'] = Newton to pdesubsystem y
Adding ['omega']['y'] = 1.0 to pdesubsystem y
    Iter 1 error | y | 5.0657e-02 4.9094e+00 |
    Iter 2 error | y | 4.7003e-06 1.0555e-04 |
    Iter 3 error | y | 1.0431e-09 8.7732e-09 |
Building mapping between periodic degrees of freedom.
Extracting matching degrees of freedom for sub space 0.
Extracting matching degrees of freedom for sub space 1.
ERROR: An unexpected error occurred while tokenizing input
The following traceback may be corrupted or invalid
The error message is: ('EOF in multi-line statement', (9, 0))

ERROR: An unexpected error occurred while tokenizing input
The following traceback may be corrupted or invalid
The error message is: ('EOF in multi-line statement', (9, 0))

---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)

/home/zeljka/cbcpdesys/cbc/cfd/ransmodels/demo/turbulent_channel.py in <module>()
     93 rans_parameters['omega'].default_factory = lambda : 0.7
     94 Turb_solver = ransmodels.StandardKE_Coupled(problem, rans_parameters,
---> 95 model=problem_parameters['turbulence_model'])
     96
     97 ## solve the problem ##

/home/zeljka/cbcpdesys/cbc/cfd/ransmodels/StandardKE_Coupled.pyc in __init__(self, problem, parameters, model)
     18 system_composition=[['k', 'e']],
     19 problem=problem,
---> 20 parameters=parameters)
     21
     22 def create_BCs(self, bcs):

/home/zeljka/cbcpdesys/cbc/cfd/ransmodels/TurbSolver.pyc in __init__(self, system_composition, problem, parameters)
     18
     19 def __init__(self, system_composition, problem, parameters):
---> 20 PDESystem.__init__(self, system_composition, problem, parameters)
     21
     22 def setup(self):

/home/zeljka/cbcpdesys/cbc/pdesys/PDESystem.pyc in __init__(self, system_composition, problem, parameters)
    106
    107 # Create all FunctionSpaces, Functions, Test-TrialFunctions etc.

--> 108 self.setup()
    109
    110 def setup(self):

/home/zeljka/cbcpdesys/cbc/cfd/ransmodels/TurbSolver.pyc in setup(self)
     28 self.boundaries = self.problem.boundaries
     29 self.model_parameters()
---> 30 self.bc = self.create_BCs(self.boundaries)
     31 self.define()
     32

/home/zeljka/cbcpdesys/cbc/cfd/ransmodels/StandardKE_Coupled.pyc in create_BCs(self, bcs)
     25 for i, bc in enumerate(bcs):
     26 if bc.type() == 'Wall':
---> 27 bcu['ke'].insert(i+1, QWall['ke'](bc, self.y, self.nu(0)))
     28 bcu['ke'][i+1].type = bc.type
     29 return bcu

/home/zeljka/cbcpdesys/cbc/cfd/tools/Wall.pyc in __init__(self, bc, y, nu)
    234 """Set epsilon = 2*nu*k/y**2 implicitly."""
    235 def __init__(self, bc, y, nu):
--> 236 Wallfunction.__init__(self, y.function_space(), bc)
    237 self.y = y.vector()
    238 self.nu = nu

/home/zeljka/cbcpdesys/cbc/cfd/tools/Wall.pyc in __init__(self, V, bc)
     39
     40 self.bnd_to_in = self.map_boundary_node_to_inner_node(V,
---> 41 vob, vib, v2c, self.corner_inner_node)
     42
     43 self.vertices_nearest = self.get_vertices_nearest(self.bnd_to_in)

/home/zeljka/cbcpdesys/cbc/cfd/tools/Wall.pyc in map_boundary_node_to_inner_node(self, V, vertices_on_boundary, vertices_inside_boundary, v2c, corner_inner_node)
     57 c = Cell(mesh,ci)
     58 dofmap.tabulate_dofs(a, c)
---> 59 x = dofmap.tabulate_coordinates(c)
     60 aa = list(a)
     61 ii = aa.index(i) # The local index of the boundary node

AttributeError: 'GenericDofMap' object has no attribute 'tabulate_coordinates'
WARNING: Failure executing file: <turbulent_channel.py>

Hi,

I remember having the same issue some time ago because the
tabulate_coordinates method for some reason temporarily was removed from
the dofmap class for some releases of dolfin. The method has returned in
newer versions though. Are you sure you're on the development version of
dolfin? What does dolfin-version say when you type it in the terminal?
What's your system?

Mikael

On 7 December 2011 21:30, Zeljka Tutek <<email address hidden>
> wrote:

> Question #181062 on CBC.PDESys changed:
> https://answers.launchpad.net/cbcpdesys/+question/181062
>
> Zeljka Tutek posted a new comment:
> I still have error:
>
> In [9]: run turbulent_channel.py
> Set the environment variable CBCRANS to control the location of stored
> results
> Building mapping between periodic degrees of freedom.
> Extracting matching degrees of freedom for sub space 0.
> Extracting matching degrees of freedom for sub space 0.
> Extracting matching degrees of freedom for sub space 1.
> Extracting matching degrees of freedom for sub space 1.
> Adding PDESubSystem: Steady_Coupled_1
> Adding ['linear_solver']['up'] = lu to pdesubsystem up
> Adding ['iteration_type'] = Newton to pdesubsystem up
> Adding stabilization for constant nu
> Setting parameters for standard K-Epsilon model
> Adding PDESubSystem: Eikonal_1
> Adding ['linear_solver']['y'] = lu to pdesubsystem y
> Adding ['iteration_type'] = Newton to pdesubsystem y
> Adding ['omega']['y'] = 1.0 to pdesubsystem y
> Iter 1 error | y | 5.0657e-02 4.9094e+00 |
> Iter 2 error | y | 4.7003e-06 1.0555e-04 |
> Iter 3 error | y | 1.0431e-09 8.7732e-09 |
> Building mapping between periodic degrees of freedom.
> Extracting matching degrees of freedom for sub space 0.
> Extracting matching degrees of freedom for sub space 1.
> ERROR: An unexpected error occurred while tokenizing input
> The following traceback may be corrupted or invalid
> The error message is: ('EOF in multi-line statement', (9, 0))
>
> ERROR: An unexpected error occurred while tokenizing input
> The following traceback may be corrupted or invalid
> The error message is: ('EOF in multi-line statement', (9, 0))
>
> ---------------------------------------------------------------------------
> AttributeError Traceback (most recent call last)
>
> /home/zeljka/cbcpdesys/cbc/cfd/ransmodels/demo/turbulent_channel.py in
> <module>()
> 93 rans_parameters['omega'].default_factory = lambda : 0.7
> 94 Turb_solver = ransmodels.StandardKE_Coupled(problem,
> rans_parameters,
> ---> 95
> model=problem_parameters['turbulence_model'])
> 96
> 97 ## solve the problem ##
>
>
> /home/zeljka/cbcpdesys/cbc/cfd/ransmodels/StandardKE_Coupled.pyc in
> __init__(self, problem, parameters, model)
> 18 system_composition=[['k', 'e']],
> 19 problem=problem,
> ---> 20 parameters=parameters)
> 21
> 22 def create_BCs(self, bcs):
>
> /home/zeljka/cbcpdesys/cbc/cfd/ransmodels/TurbSolver.pyc in __init__(self,
> system_composition, problem, parameters)
> 18
> 19 def __init__(self, system_composition, problem, parameters):
> ---> 20 PDESystem.__init__(self, system_composition, problem,
> parameters)
> 21
> 22 def setup(self):
>
> /home/zeljka/cbcpdesys/cbc/pdesys/PDESystem.pyc in __init__(self,
> system_composition, problem, parameters)
> 106
> 107 # Create all FunctionSpaces, Functions, Test-TrialFunctions
> etc.
>
> --> 108 self.setup()
> 109
> 110 def setup(self):
>
> /home/zeljka/cbcpdesys/cbc/cfd/ransmodels/TurbSolver.pyc in setup(self)
> 28 self.boundaries = self.problem.boundaries
> 29 self.model_parameters()
> ---> 30 self.bc = self.create_BCs(self.boundaries)
> 31 self.define()
> 32
>
> /home/zeljka/cbcpdesys/cbc/cfd/ransmodels/StandardKE_Coupled.pyc in
> create_BCs(self, bcs)
> 25 for i, bc in enumerate(bcs):
> 26 if bc.type() == 'Wall':
> ---> 27 bcu['ke'].insert(i+1, QWall['ke'](bc, self.y,
> self.nu(0)))
> 28 bcu['ke'][i+1].type = bc.type
> 29 return bcu
>
> /home/zeljka/cbcpdesys/cbc/cfd/tools/Wall.pyc in __init__(self, bc, y, nu)
> 234 """Set epsilon = 2*nu*k/y**2 implicitly."""
> 235 def __init__(self, bc, y, nu):
> --> 236 Wallfunction.__init__(self, y.function_space(), bc)
> 237 self.y = y.vector()
> 238 self.nu = nu
>
> /home/zeljka/cbcpdesys/cbc/cfd/tools/Wall.pyc in __init__(self, V, bc)
> 39
> 40 self.bnd_to_in = self.map_boundary_node_to_inner_node(V,
> ---> 41 vob, vib, v2c,
> self.corner_inner_node)
> 42
> 43 self.vertices_nearest =
> self.get_vertices_nearest(self.bnd_to_in)
>
> /home/zeljka/cbcpdesys/cbc/cfd/tools/Wall.pyc in
> map_boundary_node_to_inner_node(self, V, vertices_on_boundary,
> vertices_inside_boundary, v2c, corner_inner_node)
> 57 c = Cell(mesh,ci)
> 58 dofmap.tabulate_dofs(a, c)
> ---> 59 x = dofmap.tabulate_coordinates(c)
> 60 aa = list(a)
> 61 ii = aa.index(i) # The local index of the
> boundary node
>
> AttributeError: 'GenericDofMap' object has no attribute
> 'tabulate_coordinates'
> WARNING: Failure executing file: <turbulent_channel.py>
>
> --
> You received this question notification because you are an answer
> contact for CBC.PDESys.
>

Zeljka Tutek (zeljkat) said : #6

My system is Debian 6.0.2.1 Squeeze 2.6.32-5-amd64 .
dolfin.__version__ is 1.0.beta
dolfin.__path__ is /home/zeljka/Work/FEniCS/unstable/lib/python2.6/site-packages/dolfin
- I installed it yesterday with Dorsal.
Regards,
Zeljka

Ok, but the tabulate_tensor stuff is a dolfin problem, not pdesys, and it's only a problem for setting boundary conditions with RANS models. Are you thinking about doing RANS?

M

Sendt fra min iPad

Den 8. des. 2011 kl. 17:30 skrev Zeljka Tutek <email address hidden>:

> Question #181062 on CBC.PDESys changed:
> https://answers.launchpad.net/cbcpdesys/+question/181062
>
> Zeljka Tutek posted a new comment:
> My system is Debian 6.0.2.1 Squeeze 2.6.32-5-amd64 .
> dolfin.__version__ is 1.0.beta
> dolfin.__path__ is /home/zeljka/Work/FEniCS/unstable/lib/python2.6/site-packages/dolfin
> - I installed it yesterday with Dorsal.
> Regards,
> Zeljka
>
> --
> You received this question notification because you are an answer
> contact for CBC.PDESys.

Zeljka Tutek (zeljkat) said : #8

Mikael,
RANS is interesting to me as a nice example which will help me solve a different system of nonlinear pde's. So I'll go through all details of RANS.
Regards,
Zeljka

Can you help with this problem?

Provide an answer of your own, or ask Zeljka Tutek for more information if necessary.

To post a message you must log in.