Adding cpp&MATLAB example - 2D imcompressible square cylinder flow#274
Adding cpp&MATLAB example - 2D imcompressible square cylinder flow#274yiyuef wants to merge 17 commits intocsrc-sdsu:mainfrom
Conversation
|
Thank you, @yiyuef for this terrific contribution! I ran the example and can see the output figure is quite small. Can you please increase its size? Also, any specific reason why the extension Finally, I thought we also wanted to include the MATLAB/octave version to the library. I thought you had completed that implementation, first? Thank you! |
Co-authored-by: Valeria Barra <39932030+valeriabarra@users.noreply.github.com> Signed-off-by: Yiyue Feng <79966731+yiyuef@users.noreply.github.com>
|
@valeriabarra Thanks for the careful review!
|
| @@ -0,0 +1,35 @@ | |||
| set datafile separator "," | |||
There was a problem hiding this comment.
Hi @yiyuef , thank you for updating your PR.
I don't think we want to add a separate gnu plot file here. I understand the intention was for separation of concerns and tidiness, however, we want the examples to be as self-contained as possible. See for instance other C++ examples in the library, like the lock exchange.
There was a problem hiding this comment.
Please incorporate the gnu plot functionality in the same C++ source file examples/cpp/cylinder_flow_2D.cpp
There was a problem hiding this comment.
I see that this code file still gnerates gnu scripts, in a automatic way
// Generate Gnuplot script for visualization
generateGnuplotScript("plot_lock_exchange.gnu", a, b, c, d);
But I think it might be better to simply leave csv files as outputs? There are also other examples not directly outputing png.
Once user has csv, they can visualize it in their preferred ways.
There was a problem hiding this comment.
alright I will do it. I've got a delay in receiving your reply.
There was a problem hiding this comment.
Now the gnu function is within the cpp script.
Description
This PR adds a new C++ example
cylinder_flow_2Dthat solves 2D incompressible channel flow past a cylinder-like obstacle (implemented as a masked no-slip region) using a projection (pressure-correction) method built on MOLE mimetic operators.It also adds Sphinx/MyST documentation for the example and includes a representative output figure.
Type of Change
Mathematical Details
Not applicable (no new operators added).
The example solves the incompressible Navier–Stokes equations with a fractional-step (projection) method and uses MOLE discrete operators (divergence, gradient, Laplacian) for the Helmholtz/Poisson solves.
Testing
Documentation
Related Issues
#211
Additional Notes
cylinder_flow_2D_output1.pngis included alongside the documentation page.