Comments (11)
Here is my comment again. I deleted it shortly after posting, wasn't sure if the tone was a bit too harsh.
Don't forget the tutorials are tutorials. Their purpose is to show people how to set up simulation cases involving preCICE. They are not a lesson in software engineering or library development. As a new user, I would seriously be turned down by the need to understand a library-like structure of bash or python scripts calling each other, even it is minimizes code duplication.
imho, the tutorials should be self-contained, so that a user can copy the case, start modifying it without the need to keep the other tutorial cases or some additional tutorial library code. For tutorials, I would prefer straight and easy case steering code, even if snippets are copied around.
Just my 2 euro-cents. 🦆
from tutorials.
Same applies to the FSI scenarios.
from tutorials.
That's a tricky one... I am not sure if it is worth automating/centralizing this, as then a change in one tutorial could break another tutorial. On the other hand, this would be a nice way to demonstrate the "exchangeable solvers" concept.
I see two approaches:
-
Have a "main" tutorial (e.g. the OpenFOAM-OpenFOAM heated plate) and point users to it. We could then also provide a symbolic link, but this would easily lead the users to mixing up different configurations.
-
Restructure our tutorials repository in a
Single physics/Geometry/Solver
way (for example):
- Fluid
- Channel with heated bottom
- OpenFOAM
- Channel with perpendicular flap
- OpenFOAM
- SU2
- Channel with flap attached to a cylinder
- OpenFOAM
- Heat exchanger: outer fluid
- OpenFOAM
- Heat exchanger: inner fluid
- OpenFOAM
- Channel with heated bottom
- Structure
- Beam
- CalculiX
- Perpendicular flap
- CalculiX
- Flap attached to cylinder
- CalculiX
- Beam
- Heat Transfer
- Heated plate
- FEniCS
- Nutils
- OpenFOAM
- Heat exchanger: solid
- CalculiX
- Heated plate
Still, I think we would not really reduce complexity this way, but rather transform it. I would rather stick to what we have already. If a tutorial is exactly the same as another one for one participant, then I would simply write "copy this from there", as @BenjaminRueth did already. Even further, we could simply provide a one-line script to do this.
from tutorials.
I agree with @floli though I cannot see his post any longer. The structure Single physics/Geometry/Solver
, I find indeed a bit over-engineered.
Still, I think we need to restructure the tutorials soonish as we are getting more and more, and more and more different types. Which is good, of course!
Two suggestions:
- Let's get rid of the coupling physics layer,
FSI
,CHT
etc. I don't think that users will search by this. The top level could just directly be the testcase,FSI3
,Flow over heated plate
,Heat exchanger
, etc. - The second layer could directly be the solver, where the user can then choose among different options (if applicable). "Choosing" means solely modifying the preCICE config. Here, I am, however, not sure whether this is feasible and whether it is the best solution.
Option 1 (ideal world)
- FSI3
- precice-config.xml
- OpenFOAM
- dealii
- CalculiX
- FEniCS
- nutils
- Heat exchanger
- precice-config.xml
- OpenFOAM1
- OpenFOAM2
- CalculiX
- Beam
- precice-config.xml
- CalculiX1
- CalculiX2
- FEniCS1
- FEniCS2
- ...
On the testcase level, there could further be an Allrun
and an Allclean
script, but nothing else! Also not logging output etc.
Option 2 (pragmatic)
- FSI3
- OpenFOAM-dealii
- precice-config.xml
- OpenFOAM
- dealii
- OpenFOAM-FEniCS
- precice-config.xml
- OpenFOAM
- FEniCS
- OpenFOAM-dealii
- Heat exchanger
- precice-config.xml
- OpenFOAM1
- OpenFOAM2
- CalculiX
- ...
Option 3 (all flat)
- FSI3-OpenFOAM-dealii
- precice-config.xml
- OpenFOAM
- dealii
- FSI3-OpenFOAM-CalculiX
- precice-config.xml
- OpenFOAM
- CalculiX
- ...
Furthermore, but maybe this does not belong here (let's take some time to discuss this at the next coding days):
- All solvers should be started from the sub-folders,
exchange-directory
is always".."
. - Participants named after their solver, not after their physics ?? so
OpenFOAM
, notFluid
(maybePimpleFOAM
)
from tutorials.
Don't forget the tutorials are tutorials. Their purpose is too show people how to set up simulation cases involving preCICE. They are not a lesson in software engineering or library development. As a new user, I would seriously be turned down by the need to understand a library-like structure of bash or python scripts calling each other, even it is minimizes code duplication.
That's why I try to include both a fully automatic Allrun
script, but also very simple runFluid
/runSolid
scripts.
imho, the tutorials should be self-contained, so that a user can copy the case, start modifying it without the need to keep the other tutorial cases or some additional tutorial library code.
I completely agree!
For tutorials, I would prefer straight and easy case steering code, even if snippets are copied around.
What do you mean here?
@uekerman:
I understand that, at the moment, having many directories can be a bit annoying, but I don't see why move to a completely flat structure. With omitting the physics from the directory structure I am also not sure, as users may only be interested in FSI, or only in FF etc. But if it is in the naming scheme, I am ok with it.
* All solvers should be started from the sub-folders, `exchange-directory` is always `".."`.
Consistency here is important, indeed.
* Participants named after their solver, not after their physics ?? so `OpenFOAM`, not `Fluid` (maybe `PimpleFOAM`)
Here I disagree: it's not physics, but subdomain and could be many of them using the same solver. But let's discuss it in a separate thread/coding days.
from tutorials.
With omitting the physics from the directory structure I am also not sure, as users may only be interested in FSI, or only in FF etc.
I think that users will first look for the solver (e.g. OpenFOAM), only then for the coupling physics.
But let's discuss this at the coding days. There is certainly no easy solution to all this.
from tutorials.
Just discussed between @MakisH and me. Things that should / could improve (but not urgent):
- The solver (e.g. OpenFOAM) is more important than the coupled physics (Fluid or FSI) for the user because tutorials should be for the adapters (and preCICE), not for the (physical) coupled problem.
- Solvers should be started from subfolders. All solver related files should go there (including all output and e.g.
plotDisplacements.sh
). - Hide, but still retain the automation scripts (documentation should not focus on them)
- Prefer editing over automation for
precice-config.xml
, since the user needs to learn this. Also, see precice/precice#347 - Other problems are still open (such as the config duplication)
from tutorials.
In the end, we could write guidelines in markdown on how a tutorial should be structured and add it to the tutorials repo.
from tutorials.
See also #72. Do we have any updates or new opinions on this issue?
from tutorials.
See also #72. Do we have any updates or new opinions on this issue?
No updates. I think everything above is still valid. We should go for an easy first round of more consistency as described above:
- The solver (e.g. OpenFOAM) is more important than the coupled physics (Fluid or FSI) for the user because tutorials should be for the adapters (and preCICE), not for the (physical) coupled problem.
- Solvers should be started from subfolders. All solver related files should go there (including all output and e.g.
plotDisplacements.sh
).- Hide, but still retain the automation scripts (documentation should not focus on them)
from tutorials.
This was the original trigger for the tutorials restructuring project: https://github.com/orgs/precice/projects/5
With this project being closed in the next hours, we consider this closed.
from tutorials.
Related Issues (20)
- Job summaries for system tests HOT 1
- Cannot reproduce reference results for elastic-tube-1d fluid_cpp - solid_python HOT 6
- Conversion errors in FEniCS FSI cases HOT 2
- Nutils cases are extremely slower than the rest HOT 4
- peprpendicular-flap solid-openfoam case needs tuning HOT 7
- The `setup-dumux.sh` couldn't install DuMuX properly HOT 4
- Integrate updating/checking the config visualizations in the CI
- Docker build sometimes produces empty stdout.log
- Quickstart solid-cpp not being built automatically HOT 1
- Python packages not installed automatically for all tutorials HOT 2
- two-scale-heat-conduction DuMuX dependencies setup HOT 1
- Nutils tutorials always download pyprecice 3.0.0.0 HOT 3
- pushing to Git LFS
- Reference results metadata is outside the reference_results directory
- Source test cases from other repositories
- volume-coupled-flow: Source term incomplete
- Gradients: Surface-normal (scalars) vs complete (vector) HOT 1
- Missing requirements.txt and venv in some Python-based examples
- Fine-grained history and citation guidelines for each tutorial
- Specify default build arguments
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tutorials.