-
-
Notifications
You must be signed in to change notification settings - Fork 109
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
WIP: aste Replay Mode tutorial on elastic flap case #73
base: develop
Are you sure you want to change the base?
Conversation
# Conflicts: # FSI/cylinderFlap/OpenFOAM-FEniCS/Solid/cyl-flap.py
# Conflicts: # FSI/flap_perp/OpenFOAM-CalculiX/precice-config_serial.xml # FSI/flap_perp/OpenFOAM-FEniCS/precice-config_serial.xml
# Conflicts: # FSI/flap_perp/OpenFOAM-FEniCS/precice-config.xml
Try to merge the develop branch into your branch https://github.com/richahert/tutorials/tree/aste. Then, the changes here should be easier to overlook. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FSI/flap_perp/ASTE/Solid/perp-flap.py
is a copy from FSI/cylinderFlap/OpenFOAM-FEniCS/Solid/perp-flap.py
. We ask the user explicitly to copy this file in our README.md
, therefore, we could avoid this duplicate (related #28). I also think it is a bit counter-intuitive to ask the user to copy the file even though it is already provided in the folder.
For precice-config.xml
the situation is different: Changes are required and therefore, we should provide this file. The user may directly use it (quick path) or try to come up with his or her own ASTE/precice-config.xml
derived from OpenFOAM-FEniCS/precice-config.xml
.
The remaining changes are minor formatting / cleanup changes:
- A comment on markdown formatting: Note that one backtick is enough for inline code, if you want to have code blocks, use three backticks (see here).
- Don't use
from fenics import *
. Better usefrom fenics import ...
. This will require you to addXDMFFile
,TensorFunctionSpace
andLocalSolver
to thefrom fenics import ...
inperp-flap.py
.
Note:
I'm currently stuck with a segmentation fault, when I try to run preciceMap -v -c precice-config.xml -p A --mesh preCICE-output/Solid-fenics --vectordata
. It looks like an error that is not being treated properly within preCICE, but it might also be wrong usage on my side. Therefore, I will submit this review now and do another review as soon as I'm able to run the case.
FSI/cylinderFlap/OpenFOAM-FEniCS-bigdt/OpenFOAM-FEniCS/.gitignore
Outdated
Show resolved
Hide resolved
Co-Authored-By: Benjamin Rüth <[email protected]>
Co-Authored-By: Benjamin Rüth <[email protected]>
Co-Authored-By: Benjamin Rüth <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- currently aste seems to not provide the option
--vectordata
. I am using precice/aste@84ebcbc. Therefore, I cannot run the replay mode. - why is
FSI/cylinderFlap/OpenFOAM-FEniCS/Postprocessing/plot_tip.py
deleted? Is it not needed? In any case: I am not sure whether removing this file should be done within this PR.
✔️ the instructions in the README.md
are helpful and clear
Note @richahert: I can take care of applying the changes on my own. I just need some help with the --vectordata
option.
The option seems to have been removed in richahert/aste@94537d4. Whether we are dealing with scalar or vector data is detected automatically. If I remove the
I think this is an error on my side, since the data is not provided correctly. I will try to debug this now and I might comment in precice/aste#9 or open an issue in https://github.com/precice/aste. A Segmentation Fault should, of course, be avoided. |
I forgot converting the data using I will report the issue with the segmentation fault upstream. This is not related to this PR. edit: see precice/aste#11 The only remaining point is whether or not (and where) I would suggest to wait for precice/aste#9 before merging this PR, since without the feature being implemented in aste this tutorial does not really help. |
This now would need to be adjusted to the new tutorials structure. |
* Moves files that are not conflicting from FSI/flap_perp/ASTE to perpendicular-flap * perpendicular-flap/fluid-aste/README.md describes usage of aste for replay mode. This information needs to be incorporated into the new structure or moved to preCICE.org. * FSI/flap_perp/ASTE/Solid/precice-adapter-config-fsi-s.json is moved to perpendicular-flap/solid-fenic. Here integration is still a TODO. * Overwrites perpendicular-flap/solid-fenics/solid.py with FSI/flap_perp/OpenFOAM-FEniCS/Solid/perp-flap.py. Here integration into new structure is still a TODO. * Overwrites perpendicular-flap/precice-confix.xml with FSI/flap_perp/OpenFOAM-FEniCS/precice-config.xml. Here integration into new structure is still a TODO.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Todos I identified when moving to the new tutorials structure:
- We might be able to remove
Allclean
and.gitignore
. I'm not sure whether there is anything specific to the replay-mode. -
fluid-aste/README.md
explains how the replay mode is used. This information could me merged intoperpendicular-flap/README.md
or we could provide a full explanation of the replay more on the website and only provide specific information here in this tutorial. -
precice-config-aste.xml
has to be updated to the new naming. Ideally we could get rid of it and just useprecice-config.xml
for replay-mode as well.
|
||
#### The quick way to run | ||
|
||
1. Copy `perp_flap.py` from `tutorials/FSI/flap_perp/OpenFOAM-FEniCS/Solid` into `tutorials/FSI/flap_perp/ASTE/Solid`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copying files should not be necessary anymore with the new structure.
"config_file_name": "../precice-config.xml", | ||
"interface": { | ||
"coupling_mesh_name": "Solid", | ||
"read_data_name": "Data" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In replay mode we only read data from ASTE with the solid solver. This is an important difference compared to the normal tutorial.
I moved the files from the old structure to the new structure. This PR is currently not working. It might be helpful to go back to |
Copy the `preCICE-output` folder to the root directory of the aste tutorial `tutorials/perpendicular-flap/fluid-aste`. | ||
To convert the files to the correct format, open the `preCICE-output` folder and run | ||
|
||
`precice_to_aste.py Solid-fenics -n 500 -t Forces0 --datadim 3` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm currently getting stuck here. Where is the script precice_to_aste.py
? I cannot find it in https://github.com/precice/aste/tree/develop. @fsimonis any idea?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this PR is idle some time, here is a quick status update:
|
This PR adds an tutorial for aste. From the OpenFOAM-FEniCS-FSI tutorial OpenFOAM is replaced with aste that sends previously exported results to FEniCS.