Flow past a bump
Hi!
I came across your paper on cbc.rans/
http://
and thought I'd try to reproduce the results of your
second example (6.2).
a) I think that example corresponds to
cbc/cfd/
b) When I try to run it, it appears to try to load data
that isn't there:
No such file or directory: '../../
c) From grepping, it seems that file is supposed to be written
by turbulent_
d) When I try to run turbulent_
the Eikonal equation fails to solve:
File "/data/
self.bc = self.create_
File "/data/
bcu = V2F.create_
File "/data/
self.distance = Eikonal(self.mesh, self.boundaries)
File "/data/
solve(A1, self.y_.vector(), b1, self.prm[
File "/home/
return cpp.la_solve(*args)
File "/home/
return _la.la_solve(*args)
TypeError: in method 'la_solve', argument 4 of type 'std::string'
When I print out self.prm[
get:
defaultdict(
defaultdict(
e) Anyway, if I set those to be 'gmres', 'ilu', I get a crash
later with
File "turbulent_
model=
File "/data/
parameters=
File "/data/
PDESystem.
File "/data/
self.setup()
File "/data/
self.bc = self.create_
File "/data/
bcu[
File "/data/
Wallfunctio
File "/data/
self.v2c, self.c2v = v2c, c2v = self.map_
File "/data/
dofmap.
AttributeError: 'GenericDofMap' object has no attribute 'tabulate_dofs'
This is both with the package from the fenics-dev PPA, and with
a recent trunk build of dolfin.
Any suggestions? Is it possible to still run these examples?
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- CBC.PDESys Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Revision history for this message
|
#1 |
Hi Patrick,
Thanks for pointing this error out. Seems like the Eikonal solver is broken by the new solve interface of Fenics. I have committed a fix.
Den Oct 2, 2012 kl. 2:20 PM skrev Patrick Farrell:
> New question #210144 on CBC.PDESys:
> https:/
>
> Hi!
>
> I came across your paper on cbc.rans/
>
> http://
>
> and thought I'd try to reproduce the results of your
> second example (6.2).
>
> a) I think that example corresponds to
> cbc/cfd/
That is correct.
>
> b) When I try to run it, it appears to try to load data
> that isn't there:
> No such file or directory: '../../
>
> c) From grepping, it seems that file is supposed to be written
> by turbulent_
Correct again. Run a plain channel to generate inlet conditions for a complex channel.
>
> d) When I try to run turbulent_
> the Eikonal equation fails to solve:
>
> File "/data/
> self.bc = self.create_
> File "/data/
> bcu = V2F.create_
> File "/data/
> self.distance = Eikonal(self.mesh, self.boundaries)
> File "/data/
> solve(A1, self.y_.vector(), b1, self.prm[
> File "/home/
> return cpp.la_solve(*args)
> File "/home/
> return _la.la_solve(*args)
> TypeError: in method 'la_solve', argument 4 of type 'std::string'
>
> When I print out self.prm[
> get:
Try again, it works now for me.
Best regards
Mikael
>
> defaultdict(
> defaultdict(
>
> e) Anyway, if I set those to be 'gmres', 'ilu', I get a crash
> later with
>
> File "turbulent_
> model=problem_
> File "/data/
> parameters=
> File "/data/
> PDESystem.
> File "/data/
> self.setup()
> File "/data/
> self.bc = self.create_
> File "/data/
> bcu['ke'
> File "/data/
> Wallfunction.
> File "/data/
> self.v2c, self.c2v = v2c, c2v = self.map_
> File "/data/
> dofmap.
> AttributeError: 'GenericDofMap' object has no attribute 'tabulate_dofs'
>
> This is both with the package from the fenics-dev PPA, and with
> a recent trunk build of dolfin.
>
> Any suggestions? Is it possible to still run these examples?
>
> --
> You received this question notification because you are an answer
> contact for CBC.PDESys.
Revision history for this message
|
#2 |
Hi,
I still get the crash about GenericDofMap:
[pef@aislinn:
[pef@aislinn:
[pef@aislinn:
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.
Creating new work vector for up
Adding PDESubSystem: Steady_Coupled_1
Adding ['linear_
Adding ['iteration_type'] = Picard to pdesubsystem up
Adding stabilization for constant nu
Setting parameters for OriginalV2F V2F model
Solving linear variational problem.
Creating new work vector for y
Adding PDESubSystem: Eikonal_1
Adding ['linear_
Adding ['iteration_type'] = Newton to pdesubsystem y
Adding ['omega']['y'] = 1.0 to pdesubsystem y
Iter 1 error | y | 4.7003e-06 4.9094e+00 |
Iter 2 error | y | 6.8683e-10 1.0555e-04 |
Iter 3 error | y | 5.1340e-10 6.5099e-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.
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.
Traceback (most recent call last):
File "turbulent_
model=
File "/home/
parameters=
File "/home/
PDESystem.
File "/home/
self.setup()
File "/home/
self.bc = self.create_
File "/home/
bcu[
File "/home/
Wallfunctio
File "/home/
self.v2c, self.c2v = v2c, c2v = self.map_
File "/home/
dofmap.
AttributeError: 'GenericDofMap' object has no attribute 'tabulate_dofs'
This is with the latest dolfin trunk (r6948). I can't use the fenics-dev packages because
they are built without PETSc, but PDESubSystems.py hardcodes
parameters[
Thanks!
Patrick
Revision history for this message
|
#3 |
Hi,
Looks like tabulate_dofs has been removed from the dolfin dofmap. I'm on dolfin revision 6831 and I still have it. I'll see if I can find out what has happened.
You can always overload the PETSc choice by the way, just put
parameters[
just after from cbc.pdesys import * or just after if __name_
Best regards
Mikael
Den Oct 2, 2012 kl. 4:15 PM skrev Patrick Farrell:
> Question #210144 on CBC.PDESys changed:
> https:/
>
> Status: Answered => Open
>
> Patrick Farrell is still having a problem:
> Hi,
>
> I still get the crash about GenericDofMap:
>
> [pef@aislinn:
> [pef@aislinn:
> [pef@aislinn:
> 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.
> Creating new work vector for up
> Adding PDESubSystem: Steady_Coupled_1
> Adding ['linear_
> Adding ['iteration_type'] = Picard to pdesubsystem up
> Adding stabilization for constant nu
> Setting parameters for OriginalV2F V2F model
> Solving linear variational problem.
> Creating new work vector for y
> Adding PDESubSystem: Eikonal_1
> Adding ['linear_
> Adding ['iteration_type'] = Newton to pdesubsystem y
> Adding ['omega']['y'] = 1.0 to pdesubsystem y
> Iter 1 error | y | 4.7003e-06 4.9094e+00 |
> Iter 2 error | y | 6.8683e-10 1.0555e-04 |
> Iter 3 error | y | 5.1340e-10 6.5099e-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.
> 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.
> Traceback (most recent call last):
> File "turbulent_
> model=problem_
> File "/home/
> parameters=
> File "/home/
> PDESystem.
> File "/home/
> self.setup()
> File "/home/
> self.bc = self.create_
> File "/home/
> bcu['ke'
> File "/home/
> Wallfunction.
> File "/home/
> self.v2c, self.c2v = v2c, c2v = self.map_
> File "/home/
> dofmap.
> AttributeError: 'GenericDofMap' object has no attribute 'tabulate_dofs'
>
> This is with the latest dolfin trunk (r6948). I can't use the fenics-dev packages because
> they are built without PETSc, but PDESubSystems.py hardcodes
> parameters[
>
> Thanks!
>
> Patrick
>
> --
> You received this question notification because you are an answer
> contact for CBC.PDESys.
Revision history for this message
|
#4 |
Hi,
Fix committed!
Mikael
Den Oct 2, 2012 kl. 4:45 PM skrev Mikael Mortensen:
> Question #210144 on CBC.PDESys changed:
> https:/
>
> Status: Open => Answered
>
> Mikael Mortensen proposed the following answer:
> Hi,
>
> Looks like tabulate_dofs has been removed from the dolfin dofmap. I'm on
> dolfin revision 6831 and I still have it. I'll see if I can find out
> what has happened.
>
> You can always overload the PETSc choice by the way, just put
>
> parameters[
>
> just after from cbc.pdesys import * or just after if
> __name_
> it in PDESubSystems.
>
> Best regards
>
> Mikael
>
>
> Den Oct 2, 2012 kl. 4:15 PM skrev Patrick Farrell:
>
>> Question #210144 on CBC.PDESys changed:
>> https:/
>>
>> Status: Answered => Open
>>
>> Patrick Farrell is still having a problem:
>> Hi,
>>
>> I still get the crash about GenericDofMap:
>>
>> [pef@aislinn:
>> [pef@aislinn:
>> [pef@aislinn:
>> 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.
>> Creating new work vector for up
>> Adding PDESubSystem: Steady_Coupled_1
>> Adding ['linear_
>> Adding ['iteration_type'] = Picard to pdesubsystem up
>> Adding stabilization for constant nu
>> Setting parameters for OriginalV2F V2F model
>> Solving linear variational problem.
>> Creating new work vector for y
>> Adding PDESubSystem: Eikonal_1
>> Adding ['linear_
>> Adding ['iteration_type'] = Newton to pdesubsystem y
>> Adding ['omega']['y'] = 1.0 to pdesubsystem y
>> Iter 1 error | y | 4.7003e-06 4.9094e+00 |
>> Iter 2 error | y | 6.8683e-10 1.0555e-04 |
>> Iter 3 error | y | 5.1340e-10 6.5099e-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.
>> 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.
>> Traceback (most recent call last):
>> File "turbulent_
>> model=problem_
>> File "/home/
>> parameters=
>> File "/home/
>> PDESystem.
>> File "/home/
>> self.setup()
>> File "/home/
>> self.bc = self.create_
>> File "/home/
>> bcu['ke'
>> File "/home/
>> Wallfunction.
>> File "/home/
>> self.v2c, self.c2v = v2c, c2v = self.map_
>> File "/home/
>> dofmap.
>> AttributeError: 'GenericDofMap' object has no attribute 'tabulate_dofs'
>>
>> This is with the latest dolfin trunk (r6948). I can't use the fenics-dev packages because
>> they are built without PETSc, but PDESubSystems.py hardcodes
>> parameters[
>>
>> Thanks!
>>
>> Patrick
>>
>> --
>> You received this question notification because you are an answer
>> contact for CBC.PDESys.
>
> --
> You received this question notification because you are an answer
> contact for CBC.PDESys.
Revision history for this message
|
#5 |
Sorry to be a pest.
When I run this (r73 of cbcpdesys, r6949 of dolfin, ubuntu precise), I get the following error message:
Building mapping between periodic degrees of freedom.
ESC[1;37;32mDerived Quantity: Ce1ESC[0m
ESC[1;37;32mAdding ['linear_
ESC[1;37;32mAdding ['apply']['Ce1'] = project to pdesubsystem Ce1ESC[0m
ESC[1;37;32mAdding ['omega']['Ce1'] = 0.7 to pdesubsystem Ce1ESC[0m
Building mapping between periodic degrees of freedom.
[0]PETSC ERROR: -------
[0]PETSC ERROR: Floating point exception!
[0]PETSC ERROR: Infinite or not-a-number generated in norm!
[0]PETSC ERROR: -------
The backtrace on the call to PetscError doesn't yield very much, unfortunately:
#0 0x00007fffe7146c7c in PetscError () from /usr/lib/
#1 0x00007fffe73a0a75 in VecNorm () from /usr/lib/
#2 0x00007fffec10ab27 in dolfin:
#3 0x00007fffec12580b in dolfin::residual (A=..., x=..., b=...) at /home/pef/
#4 0x00007fffcc520c5b in _wrap_residual (args=<optimised out>) at /home/pef/
#5 0x000000000049c4d8 in PyEval_EvalFrameEx ()
Any ideas what might be going wrong?
Revision history for this message
|
#6 |
Den Oct 2, 2012 kl. 9:31 PM skrev Patrick Farrell:
> Question #210144 on CBC.PDESys changed:
> https:/
>
> Status: Answered => Open
>
> Patrick Farrell is still having a problem:
> Sorry to be a pest.
Not at all.
>
> When I run this (r73 of cbcpdesys, r6949 of dolfin, ubuntu precise), I
> get the following error message:
>
> Building mapping between periodic degrees of freedom.
> ESC[1;37;32mDerived Quantity: Ce1ESC[0m
> ESC[1;37;32mAdding ['linear_
> ESC[1;37;32mAdding ['apply']['Ce1'] = project to pdesubsystem Ce1ESC[0m
> ESC[1;37;32mAdding ['omega']['Ce1'] = 0.7 to pdesubsystem Ce1ESC[0m
> Building mapping between periodic degrees of freedom.
> [0]PETSC ERROR: -------
> [0]PETSC ERROR: Floating point exception!
> [0]PETSC ERROR: Infinite or not-a-number generated in norm!
> [0]PETSC ERROR: -------
>
> The backtrace on the call to PetscError doesn't yield very much,
> unfortunately:
>
> #0 0x00007fffe7146c7c in PetscError () from /usr/lib/
> #1 0x00007fffe73a0a75 in VecNorm () from /usr/lib/
> #2 0x00007fffec10ab27 in dolfin:
> #3 0x00007fffec12580b in dolfin::residual (A=..., x=..., b=...) at /home/pef/
> #4 0x00007fffcc520c5b in _wrap_residual (args=<optimised out>) at /home/pef/
> #5 0x000000000049c4d8 in PyEval_EvalFrameEx ()
>
> Any ideas what might be going wrong?
Ah, this is probably because of the Periodic boundary conditions issues of lately. Could you please try this change to line 32 of ransmodels/V2F.py
#Ce1(ns, 'Ce1', V, "1.4*(1. + Ced*sqrt(
DQ_NoBC(ns, 'Ce1', V, "1.4*(1. + Ced*sqrt(
You will now probably get a little further before there are some new problems with the periodic boundaries. I have implemented a fix for periodic boundary conditions in my own branch at lp:~mikael-mortensen/dolfin/dolfin. As of now I think periodic boundary conditions can only be used through the LinearVariation
Please let me know if I'm wrong and the periodic boundary conditions actually work.
There is currently a plan to incorporate periodic boundary conditions in the dofmaps, so I don't think there will be a fix of the regular PeriodicBC.
Best regards
Mikael
>
> --
> You received this question notification because you are an answer
> contact for CBC.PDESys.
Revision history for this message
|
#7 |
Hi Patrick,
I've added the inlet profile you need to run turbulent_apbl, so that you don't have to run the channel first. Could you please let me know if the demo works now?
Best regards
Mikael
Den Oct 2, 2012 kl. 10:11 PM skrev Mikael Mortensen:
> Question #210144 on CBC.PDESys changed:
> https:/
>
> Status: Open => Answered
>
> Mikael Mortensen proposed the following answer:
>
> Den Oct 2, 2012 kl. 9:31 PM skrev Patrick Farrell:
>
>> Question #210144 on CBC.PDESys changed:
>> https:/
>>
>> Status: Answered => Open
>>
>> Patrick Farrell is still having a problem:
>> Sorry to be a pest.
>
> Not at all.
>
>>
>> When I run this (r73 of cbcpdesys, r6949 of dolfin, ubuntu precise), I
>> get the following error message:
>>
>> Building mapping between periodic degrees of freedom.
>> ESC[1;37;32mDerived Quantity: Ce1ESC[0m
>> ESC[1;37;32mAdding ['linear_
>> ESC[1;37;32mAdding ['apply']['Ce1'] = project to pdesubsystem Ce1ESC[0m
>> ESC[1;37;32mAdding ['omega']['Ce1'] = 0.7 to pdesubsystem Ce1ESC[0m
>> Building mapping between periodic degrees of freedom.
>> [0]PETSC ERROR: -------
>> [0]PETSC ERROR: Floating point exception!
>> [0]PETSC ERROR: Infinite or not-a-number generated in norm!
>> [0]PETSC ERROR: -------
>>
>> The backtrace on the call to PetscError doesn't yield very much,
>> unfortunately:
>>
>> #0 0x00007fffe7146c7c in PetscError () from /usr/lib/
>> #1 0x00007fffe73a0a75 in VecNorm () from /usr/lib/
>> #2 0x00007fffec10ab27 in dolfin:
>> #3 0x00007fffec12580b in dolfin::residual (A=..., x=..., b=...) at /home/pef/
>> #4 0x00007fffcc520c5b in _wrap_residual (args=<optimised out>) at /home/pef/
>> #5 0x000000000049c4d8 in PyEval_EvalFrameEx ()
>>
>> Any ideas what might be going wrong?
>
> Ah, this is probably because of the Periodic boundary conditions issues
> of lately. Could you please try this change to line 32 of
> ransmodels/V2F.py
>
> #Ce1(ns, 'Ce1', V, "1.4*(1. + Ced*sqrt(
> DQ_NoBC(ns, 'Ce1', V, "1.4*(1. + Ced*sqrt(
>
> You will now probably get a little further before there are some new
> problems with the periodic boundaries. I have implemented a fix for
> periodic boundary conditions in my own branch at lp:~mikael-
> mortensen/
> can only be used through the LinearVariation
> etc). In my branch I have implemented periodic boundary conditions such
> that I can have more than one periodic direction, I can use it from
> python in regular forms and I eliminate slave dofs to obtain a
> coefficient matrix that is much better conditioned than with the regular
> PeriodicBC, where you get some bad master/slave rows the Krylov solvers
> don't like.
>
> Please let me know if I'm wrong and the periodic boundary conditions
> actually work.
>
> There is currently a plan to incorporate periodic boundary conditions in
> the dofmaps, so I don't think there will be a fix of the regular
> PeriodicBC.
>
> Best regards
>
> Mikael
>
>
>>
>> --
>> You received this question notification because you are an answer
>> contact for CBC.PDESys.
>
> --
> You received this question notification because you are an answer
> contact for CBC.PDESys.
Revision history for this message
|
#8 |
Hi!
Thanks for committing the data file.
The apbl example doesn't work with the dolfin trunk, so I tried to compile your branch. Your branch doesn't compile, with the following error:
/data/pfarrell/
/data/pfarrell/
/data/pfarrell/
/data/pfarrell/
/data/pfarrell/
/data/pfarrell/
/data/pfarrell/
/data/pfarrell/
I'm not immediately sure how to turn of -Werror=
Revision history for this message
|
#9 |
Hi,
Sorry for the inconvenience and thanks for the effort. Looks like the previous warnings have become errors. I removed the unused variables and now it should work. It still doesn't work with trunk for me, though, but I'm looking into it.
Best regards
Mikael
Den Oct 4, 2012 kl. 12:35 AM skrev Patrick Farrell:
> Question #210144 on CBC.PDESys changed:
> https:/
>
> Patrick Farrell posted a new comment:
> Hi!
>
> Thanks for committing the data file.
>
> The apbl example doesn't work with the dolfin trunk, so I tried to
> compile your branch. Your branch doesn't compile, with the following
> error:
>
> /data/pfarrell/
> /data/pfarrell/
> /data/pfarrell/
> /data/pfarrell/
> /data/pfarrell/
> /data/pfarrell/
> /data/pfarrell/
> /data/pfarrell/
>
> I'm not immediately sure how to turn of -Werror=
> sure it's not too hard to get rid of the unused variables.
>
> --
> You received this question notification because you are an answer
> contact for CBC.PDESys.
Can you help with this problem?
Provide an answer of your own, or ask Patrick Farrell for more information if necessary.