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

ft08_navier_stokes_cylinder.py does not run

0 votes

Hi I'm new to FEniCS and trying to work through the tutorial, however whenI try to run the example of Navier-Stokes flow past a cylinder (ft08_navier_stokes_cylinder.py) I get the following error:

Traceback (most recent call last):
File "ft08_navier_stokes_cylinder.py", line 102, in
xdmffile_u = XDMFFile('navier_stokes_cylinder/velocity.xdmf')
TypeError: init() takes exactly 3 arguments (2 given)

I can't see how to correct this error, and I haven't made any alterations to the file.

Thanks in advance

asked Apr 24, 2017 by H.Allen53 FEniCS Novice (120 points)

I just downloaded the script from here and ran it in the quay.io/fenicsproject/stable:current Docker container, and it works fine for me. How did you install FEniCS?

XDMFFile used to require an MPI communicator as well as the file URL in old versions of DOLFIN pre 2016.

I tried running the script commenting out the commands involving XDMF and it ran fine, so could this be solved by updating to the newest version?

I installed it using the automated build script, but this was quite a while ago before the new 2016 update.

Yes, updating to the latest stable version, that is version 2016.2, will solve the problem.

...