Tutorials for unsteady FSI with Python wrapper and Nastran structure#3
Tutorials for unsteady FSI with Python wrapper and Nastran structure#3pcarruscag merged 2 commits intosu2code:masterfrom Nicola-Fonzi:publish
Conversation
* folder created * Created folder Ma01 * Create folder Ma02 * Create folder Ma03 * Create folder Ma0357 * Create dummy.txt * Add files via upload * Add files via upload * Delete dummy.txt * Add files via upload * Delete dummy.txt * Add files via upload * Delete dummy.txt * Add files via upload * Delete dummy.txt * Add files via upload * Delete dummy.txt * Add files via upload * Delete dummy.txt * Add files via upload * Delete FlatPlateModel.m * Add files via upload * Add files via upload * Update ObtainTheoResults.m * Delete Main_compare.m * Delete ObtainSU2Results.m * Delete ObtainTheoResults.m * Add files via upload * Update ObtainTheoResults.m * Delete Main_compare.m * Add files via upload * Update fluid.cfg * Update fsi.cfg * Update solid.cfg * Update fluid.cfg * Update fsi.cfg * Update solid.cfg * Update fluid.cfg * Update fsi.cfg * Update solid.cfg * Update fluid.cfg * Update fsi.cfg * Update solid.cfg * Update fluid.cfg * Update fsi.cfg * Update solid.cfg * Delete Main_compare.m * Delete ObtainSU2Results.m * Delete ObtainTheoResults.m * Delete readHistoryModal.m * Delete readHistoryNodal.m * Delete readPunchShapes.m * Add files via upload
pcarruscag
left a comment
There was a problem hiding this comment.
Great! Thanks for reducing the number of mesh files.
| %% \file ObtainSU2Results.m | ||
| % \brief Retrives the SU2-Nastran results |
There was a problem hiding this comment.
There is a strange symbol here?
There was a problem hiding this comment.
Very strange, I just have no idea what that is ... removing
There was a problem hiding this comment.
Ok I know what that is... it is a hidden symbol that Matlab uses for the title line of a function. It is added when you place the double %% at the beginning. If you open the file in Matlab it disappears
There was a problem hiding this comment.
^M is a carriage return. I get rid of these using vim on linux
Conversely, when viewing a file originating from a Windows computer on a Unix-like system, the extra CR may be displayed as a second line break, as ^M, or as at the end of each line. see here
this whole line feed - carriage return thing between the OS's is sometimes annoying
There was a problem hiding this comment.
Ok thanks, I will remove them
| plot(Ma,f_alpha/wa*2*pi,'o','LineWidth',2) | ||
| hold on | ||
| plot(Ma,f_h/wa*2*pi,'o','LineWidth',2) | ||
| end No newline at end of file |
There was a problem hiding this comment.
Can you add a newline at the end to all matlab files, if git wants it... one can grant this wish as long as that is ok with matlab ....but I guess that is the case.
|
|
||
| function [t,q,qdot,qddot] = readHistoryModal(filename,nmodes,n,display) | ||
|
|
There was a problem hiding this comment.
It would be nice to add some comments what those functions do. The filenames already hint that but imo adding information to in/output of those functions cannot hurt without bloating comments everywhere... and explanation what they are meant for or what a script does (in case it is not a function definition).
Considering that Matlab is proprietary and one has to assume people dont have it, this becomes especially interesting if they want to recreate the output. I would have preferred python here in the first place (I just assume that these scripts could be written in python and I might be wrong with that)
... BUT it generally is great to add postprocessing scripts like you do here so thumbs up for that 👍 imo that really adds to the value of a tutorial
There was a problem hiding this comment.
They might run on Octave too.
There was a problem hiding this comment.
I perfectly agree, Python would have been perfect. Unfortunately, we started working on the postprocessing with Matlab for ease of use and then a lot of postprocessing functions accumulated.
It is definitely in my TODO list to transfer them to python3.
In any case, I do not use complex functions from Matlab so I think, as suggested by @pcarruscag, that they may run in Octave.
I can add some comments to make them more self explaining so that if someone has to modify them, they are easy to read
There was a problem hiding this comment.
ok cool, I wasn't aware that The Octave syntax is largely compatible with Matlab ... big-brain-move of octave to snatch some matlab users
|
Ok I added new lines and comments in all Matlab files (plus removing the carriage returns). |
I dont see any new commit(s) here, is it possible you forgot to push :) Oh and i see you made the links in your tutorial point to the master here already, so we could think of pushing this directly to the master ... so we dont forget later when your code in su2 gets into the master. As the tutorial is up anyway I guess that should be fine. |
|
I am sorry, I was pushing to the wrong branch... |
|
Yes the links were intended to work already using the master, so that the webpage should not be changed again |
|
Dear all, |
PR related to pull request #1124 in the SU2 repo