Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ValueError when running elliptical_drop example #327

Closed
streth11 opened this issue Jan 31, 2022 · 1 comment
Closed

ValueError when running elliptical_drop example #327

streth11 opened this issue Jan 31, 2022 · 1 comment

Comments

@streth11
Copy link

Hi, Bit of a beginner but I have just done a fresh install following the docs on a Ubuntu 18 machine and when runninh pysph run elliptical_drop It seems to run fine but when it reaches 100% it errors and I have no idea what to do to fix it.

Cheers

thomas@ubuntu ~/Documents/DP4_2 $ pysph run elliptical_drop
Running example pysph.examples.elliptical_drop.

Information for example: pysph.examples.elliptical_drop
Evolution of a circular patch of incompressible fluid. (60 seconds)

See J. J. Monaghan "Simulating Free Surface Flows with SPH", JCP, 1994, 100, pp
399 - 406

An initially circular patch of fluid is subjected to a velocity profile that
causes it to deform into an ellipse. Incompressibility causes the initially
circular patch to deform into an ellipse such that the area is conserved. An
analytical solution for the locus of the patch is available (exact_solution)

This is a standard test for the formulations for the incompressible SPH
equations.
Elliptical drop :: 5025 particles
Effective viscosity: rho*alpha*h*c/8 = 0.5687500000000001
Generating output in /home/thomas/Documents/DP4_2/elliptical_drop_output
Precompiled code from: /home/thomas/.pysph/source/py3.8-linux-x86_64/m_b41d0ba62d49506702fe93e0c4092ae9.pyx
No of particles:
----------------------------------------------------------------------
  fluid: 5025
----------------------------------------------------------------------
Setup took: 0.12276 secs
100%
Run took: 31.01062 secs
Traceback (most recent call last):
  File "/home/thomas/.local/bin/pysph", line 8, in <module>
    sys.exit(main())
  File "/home/thomas/.local/lib/python3.8/site-packages/pysph/tools/cli.py", line 69, in main
    args.func(extra)
  File "/home/thomas/.local/lib/python3.8/site-packages/pysph/tools/cli.py", line 16, in run_examples
    main(args)
  File "/home/thomas/.local/lib/python3.8/site-packages/pysph/examples/run.py", line 187, in main
    run_command(module, argv[1:])
  File "/home/thomas/.local/lib/python3.8/site-packages/pysph/examples/run.py", line 147, in run_command
    _exec_file(filename)
  File "/home/thomas/.local/lib/python3.8/site-packages/pysph/examples/run.py", line 21, in _exec_file
    exec(co, ns)
  File "/home/thomas/.local/lib/python3.8/site-packages/pysph/examples/elliptical_drop.py", line 226, in <module>
    app.post_process(app.info_filename)
  File "/home/thomas/.local/lib/python3.8/site-packages/pysph/examples/elliptical_drop.py", line 219, in post_process
    self._compute_results()
  File "/home/thomas/.local/lib/python3.8/site-packages/pysph/examples/elliptical_drop.py", line 196, in _compute_results
    for sd, array in iter_output(self.output_files, 'fluid'):
  File "/home/thomas/.local/lib/python3.8/site-packages/pysph/solver/utils.py", line 317, in iter_output
    data = load(file)
  File "/home/thomas/.local/lib/python3.8/site-packages/pysph/solver/output.py", line 298, in load
    return output.load(fname)
  File "/home/thomas/.local/lib/python3.8/site-packages/pysph/solver/output.py", line 79, in load
    return self._load(fname)
  File "/home/thomas/.local/lib/python3.8/site-packages/pysph/solver/output.py", line 135, in _load
    solver_data = _get_dict_from_arrays(data["solver_data"])
  File "/home/thomas/.local/lib/python3.8/site-packages/numpy/lib/npyio.py", line 243, in __getitem__
    return format.read_array(bytes,
  File "/home/thomas/.local/lib/python3.8/site-packages/numpy/lib/format.py", line 742, in read_array
    raise ValueError("Object arrays cannot be loaded when "
ValueError: Object arrays cannot be loaded when allow_pickle=False
thomas@ubuntu ~/Documents/DP4_2 $ 
@prabhuramachandran
Copy link
Contributor

Sorry this is an issue that is long since fixed in github master but I have just not gotten around to a release on pypi. We are almost fully ready to make a release and I hope by this weekend we will do so. Until then you should consider installing from github like so: pip install https://github.com/pypr/pysph/zipball/master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants