Code Monkey home page Code Monkey logo

postsph.jl's Introduction

NOTICE

I am actively developing it, some features especially related to vtk have been removed for now. If you were using this package, please use an older version from late 2019, to keep the same functions as before.

PostSPH.jl

Easing the process of post-processing simulations done in DualSPHysics. Currently supporting version 5.0 of DualSPHysics. Please make a issue if you are not able read bi4's generated using version 5.

Installation

The code has been tested on version 1.5 of Julia and currently installation is done through:

] add https://github.com/AhmedSalih3d/PostSPH.jl

Bracket, "]", is to enter "pkg" mode in Julia shell. The reason for install being this way currently is that it is an unofficial package right now. To use the package write, using PostSPH.

If you want to test the "dev" version or any other branch, then instead write:

] add https://github.com/AhmedSalih3d/PostSPH.jl#dev

If you encounter an issue using a development branch, please post an issue.

Usage

After installation some different functions are available, which are specifically related to the bi4 file type. Previously working with vtk's was also supported (2019 repo), but now focus is on bi4.

readBi4Array(typ::Cat)
  • Example: Please go to the "example" folder in this repo. Feel free to add your own examples or use cases if you believe it is relevant for others too.

Subfunctions in this package

To make this module easier to maintain functionality has been split into subfunctions which the main functions utilize. Every function preprended with a underscore, ' _ ' is not meant to be used by the user, but is still usable.

Performance Tip

Due to the way Julia functions, it will recompile a function if input/output changes. A basic example would be running a function with a "Float32" and then a "Float64" input. If the input type is hardcoded Julia will under the hood recompile a type specific version for each input type. Therefore, as an user, if you experience slow initial performance, when trying to load a new variable, try in the first run only to read one file, ie. vel_array = readBi4Array("Part_0000.bi4",Cat(3)) and then afterwards read all files, by using only "Part".

Current Implementation (Version 0.3.0)

Currently it is possible to:

  1. Read single or all .bi4 files in a directory, simply mentioning the array in question

To do

Realistic ideas for the future:

  1. Develop algorithm to give a number describing particle spacing ie. has the simulation coarsened over time or kept uniform
  2. Implement a version of DualSPHysics own tools for post-processing in Julia ie. velocity measurement, surface elevation etc.
  3. Further automatic post-processing calculations

Credits

Version 0.3.0 has been developed by;

  • Ahmed Salih (AhmedSalih3d) - Idea instigator, user of DualSPHysics for about a year, primary maintainer of code now
  • Saif Salih (sayfsal) - Developer of initial custom .vtk reader

postsph.jl's People

Contributors

ahmedsalih3d avatar saifsal avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

postsph.jl's Issues

A problem occurred while executing using PostSPH

When I install it and want to simulate exporting a case's BI4 file, the following problem occurs when I execute using PostSPH.
1.ERROR: LoadError: LoadError: ArgumentError: Package PostSPH does not have WriteVTK in its dependencies:

  • If you have PostSPH checked out for development and have
    added WriteVTK as a dependency but haven't updated your primary
    environment's manifest file, try Pkg.resolve().
  • Otherwise you may need to report an issue with PostSPH
    2.ERROR: Failed to precompile PostSPH [3add7fd0-679a-11e9-0c14-5b1cacad3044] to C:\Users\61773.julia\compiled\v1.1\PostSPH\51Lgh.ji.
    What should I do to solve this problem?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.