venturi123 / DRLinFluids

An open-source Python platform of coupling deep reinforcement learning and OpenFOAM
Other
135 stars 28 forks source link

Problem about post processing #17

Closed jiangzhangze closed 7 months ago

jiangzhangze commented 7 months ago

I‘m trying to reproduce this paper.And now I have finished the training.But only reward curve can be reported by tensorboard.what should I do to get the RMS of the lift coefficient and the the non-dimensional amplitude

venturi123 commented 7 months ago

Hi Zhangze,

You can obtain all the results, including action, step reward, Cd, Cl, etc. from the recordfolder for each environment.

jiangzhangze commented 7 months ago

Hi Zhangze,

You can obtain all the results, including action, step reward, Cd, Cl, etc. from the recordfolder for each environment.

Hi @venturi123 ,Thanks for your reply.Here are the best_history_force_Coeffs_df in my env01.It looks like only one step of data is recorded.But I want to record all data during trainning.Do you have any advices?

best_history_force_Coeffs_df.csv

venturi123 commented 7 months ago

If I understand correctly, do you wanna an entire log for all eposides and all steps during the training?

DRLinFluids will indeed record all details of the training stage but in a separate manner, which means you can find files like history_force_Coeffs_df_*.csv in the record directory. The suffix "*" implies the number of episodes.

The best_history_force_Coeffs_df.csv you attached only recorded the best performance of DRL agent eposide, which is for quick check in training stage.

jiangzhangze commented 7 months ago

If I understand correctly, do you wanna an entire log for all eposides and all steps during the training?

Lastly,I would like to confirm what each item in the history_force_Coeffsdf*.csv is. I think from left to right are time, reward, drag, lift, action, amplitude.

venturi123 commented 7 months ago

Not really. The history_force_Coeffs_df_*.csv logs the output of five force coefficients over time. In sequence:

  1. simulation time: t
  2. total moment coefficient: Cm
  3. total drag coefficient: Cd
  4. total lift coefficient: Cl
  5. total front lift coefficient: Cl(f)
  6. total rear lift coefficient: Cl(r)
jiangzhangze commented 7 months ago

Not really. The history_force_Coeffs_df_*.csv logs the output of five force coefficients over time. In sequence:

  1. simulation time: t
  2. total moment coefficient: Cm
  3. total drag coefficient: Cd
  4. total lift coefficient: Cl
  5. total front lift coefficient: Cl(f)
  6. total rear lift coefficient: Cl(r)

Thanks a lot!

venturi123 commented 7 months ago

Sound good. I guess we have resolved your question. : ) The issue will be closed, but feel free to reopen it once you have more comments.

Best, Qiulei

jiangzhangze commented 7 months ago

Hi @venturi123 ,one more request.How to load best_model.pth in square_viv_2D/square_2D for test, and how to start a baseline simulation by DRLinFluids.