argonne-lcf / TensorFlowFoam

Integrating the TensorFlow 1.15 C-API into OpenFOAM 5.0 for data-driven CFD algorithm development
MIT License
201 stars 72 forks source link

The issue about "sample" function #5

Closed Sanyaoshanren closed 3 years ago

Sanyaoshanren commented 4 years ago

Dear Maulik ThankU for your fantastic contribution, I have a little issue while performing the Testing case. All of the procedures were done and work really well. Moreover I have tried to performing the functions in the controlDict file: "functions { //#includeFunc "stressComponents" //#includeFunc "pressureCoefficient" //#includeFunc "sample" //#includeFunc "sampleCp" //#includeFunc "writeCellCentres" //#includeFunc "wallShearStress" }" However, while execution, the OpenFOAM report: "--> FOAM FATAL ERROR: Unknown RASModel type ML_SA_CG" Is there anything wrong about my comprehension?
Thanks a lot!

Romit-Maulik commented 4 years ago

Hello! Are you sure you added the ML_SA_CG.so file in your libs information within controlDict? For example here. If you have then it may be so that the ML_SA_CG.so file is not being found by the solver at run-time. Can you confirm that this file exists in $FOAM_USER_LIBBIN?

Thanks

Romit

Sanyaoshanren commented 4 years ago

Much appreciation about your advice, I solved the problem by execute the following codes ahead of the mentioned codes. "libs ( "ML_SA_CG.so" );" Sorry to bother you,but I still got a little question. What does the word "yWall" stands for in your current study? I haven't found the explaination in the reference paper of yours.

Romit-Maulik commented 4 years ago

Great! yWall is given by the y+ distance from the wall as computed by OpenFOAM's internal utilities.

Sanyaoshanren commented 4 years ago

Hi Romit,I have read carefully of the README and trying to figure out the process of ML_RANS framework. There are two questions I want to ask for your advice. Question 1 is about the simpleFoam_ML, is the ML turbulence model only performed once in the solving? Question 2 is about the filter, is there any detailed description about the filter that I can refer to? I was not familiar about the function of the filters. Thank U very much!

Sanyaoshanren

Romit-Maulik commented 4 years ago
  1. Yes - simpleFoam_ML does the turbulent eddy viscosity calculation just once prior to the start of the simple algorithm and fixes this viscosity. This is what gets you the speed up.
  2. I think you can find the definition of the simple filter we use here. It is basically a weighted average of face-centered values (which are interpolated from the cell-centered ones) and where the weights are given by the area of the faces.
Sanyaoshanren commented 4 years ago

Your explanation is very clear!Thank U Romit!

Romit-Maulik commented 4 years ago

Glad to help. Happy foaming!