GithubHelp home page GithubHelp logo

joconnor22 / life Goto Github PK

View Code? Open in Web Editor NEW
37.0 9.0 15.0 96 KB

A parallel lattice Boltzmann-immersed boundary-finite element (LIFE) solver for fluid-structure interaction.

License: GNU General Public License v3.0

C++ 95.10% C 2.53% Makefile 0.38% Shell 1.99%
computational-fluid-dynamics fluid-structure-interaction lattice-boltzmann immersed-boundary finite-element-method

life's People

Contributors

alexderosis avatar ianhinder avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

life's Issues

Running tests from top-level LIFE directory deletes everything in it

If you run the tests like this, from the LIFE directory rather than the testing directory (the README is unclear about this):

$ git clone [email protected]:joconnor22/LIFE.git
Cloning into 'LIFE'...
remote: Enumerating objects: 144, done.
remote: Counting objects: 100% (70/70), done.
remote: Compressing objects: 100% (34/34), done.
remote: Total 144 (delta 45), reused 36 (delta 36), pack-reused 74
Receiving objects: 100% (144/144), 89.68 KiB | 553.00 KiB/s, done.
Resolving deltas: 100% (68/68), done.
$ cd LIFE
$ testing/store-ref-data.sh 

Storing new * RefData!

cp: ../examples/*/params.h: No such file or directory
$ ls -a
*		.		..		.git		.gitignore

it deletes everything in the LIFE directory! This could be quite "irritating" if you happened to have uncommitted changes that could not be recovered from .git! (This just happened to me, and I luckily had a backup from yesterday, so could recover everything.)

The problem, as usual, is that bash is a terribly unsafe language. Adding some debug code, we see

$ testing/store-ref-data.sh 
+ for d in '../examples/*/'
+ casePath='../examples/*'
+ caseName='*'
+ printf '\nStoring new * RefData!\n\n'

Storing new * RefData!

+ echo 'rm -rf *'
rm -rf *
+ echo Exiting
Exiting
+ exit 0

Since '../examples/*/' doesn't match anything, since we are in the wrong directory, bash returns it unevaluated, and a lucky sequence of path manipulations converts this into rm -rf *. At least it doesn't delete anything outside LIFE! The (weird) behaviour of bash can be fixed by using

shopt -s nullglob

so that the empty wildcard expansion expands to a null string, rather than to itself. See here. The loop is then never run, and nothing is deleted.

It would also be good to have an initial check for being in the correct directory so that the user is given a good error message.

I will make a PR.

Write restart file safely

Currently, LIFE writes restart files overwriting the previous ones. If there is a failure during writing the restart file, the original restart file will be lost and the simulation will have to be started from the beginning. LIFE could instead write the new restart file to a temporary filename, and only when all restart files have been successfully written, rename them over the old ones.

Tests take a long time to run

On my machine, the LIFE test suite takes about 6 minutes to run, making it less likely that people will run them. I notice that the test cases run a lot of timesteps. If the purpose is to test for regressions, then probably only a few timesteps are needed. The resolution also doesn't need to be very high.

Would it make sense to reduce the number of timesteps, and potentially also the resolution of each test?

Does this open source project support the study of the effect of surface roughness on the deformation behavior of flexible plates in flow fields?

Dear developers,
It is my honor to write this letter! I hope to investigate the effect of surface roughness on the deformation behavior of flexible plates in flow fields. However, due to a lack of understanding of the underlying logic of the project, I am not sure whether this open project can achieve my expected goals and whether there is complete validation of reference data and literature. I hope to receive a response from the developers, and I will be very grateful! Thank you!

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.