jerabaul29 / Cylinder2DFlowControlDRL

code for performing active flow control of the 2D Karman street using Deep Reinforcement Learning
MIT License
150 stars 64 forks source link

How to customize the .xdmf file for initial conditions? #10

Closed yuyangw closed 5 years ago

yuyangw commented 5 years ago

Hi, I'm trying to create a new mesh model and run that in the baseline flow. But if I just plug in my mesh model, the line XDMFFile(comm, flow_params[path]).read_checkpoint(func, name, 0) will give Segmentation fault (core dumped), where flow_params[path] is 'u_init.xdmf' file. Could you plz give an instruction on how I can customize my own .xdmf files fitting the new mesh model? Thanks a lot!

jerabaul29 commented 5 years ago

Hi,

I am not sure what you are trying to do so it is not so easy to help. But have you done the things as recommended in the readme, 'Making a new mesh' and 'To go further' sections? If you want to do something more sophisticated / outside of this range, this is not really the point of this repo and this would take me quite some work to develop and test myself, so I will not have the time for it.

yuyangw commented 5 years ago

Thanks for your reply. And yes, I followed 'Making a new mesh' section and had a new mesh model by running make_mesh.py. But after make_mesh.py generates the mesh files, it cannot conduct further calculations and the plot is just blank with probe points. And it gives *** Warning: Found no facets matching domain for boundary condition. Did I miss something? I'm thinking the problem maybe the p_init.xdmf and u_init.xdmf files or the boundary conditions. Thanks!

jerabaul29 commented 5 years ago

Strange. Can you post your full terminal output so that I have a look? Also, what exact configuration did you run? (i.e. can you join here a .tar of the files on which you run the make_mesh.py?).

jerabaul29 commented 5 years ago

Also, can you go in details in the whole explanations here and try similar things? Unfortunately the singularity container was built without gmsh, so this is a bit hacky and some problems easily appear:

https://github.com/jerabaul29/Cylinder2DFlowControlDRL/issues/4

jerabaul29 commented 5 years ago

(i.e., can you look at issue 4, in link, which I helped the author solve, and may be the same as yours?).

yuyangw commented 5 years ago

It turns out that I didn't define the jet correctly and that caused the issue. Thanks for your time and advice!

jerabaul29 commented 5 years ago

Perfect, great to know that it works now! :)