CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

Request for Guidance on Exporting and Updating CFD Data for 3D Reduced Order Models

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 28, 2024, 13:43
Default Request for Guidance on Exporting and Updating CFD Data for 3D Reduced Order Models
  #1
New Member
 
Naruto Uzumaki
Join Date: Dec 2023
Posts: 3
Rep Power: 2
romi is on a distinguished road
Hello everyone,

I hope this message finds you well. I am currently working on a project focused on building non-intrusive (data-driven) reduced order models for CFD simulations using Fluent as my solver.

While I have successfully managed to extract and work with cell/nodal data from 2D simulations, I am encountering challenges with implementing this for 3D cases. Specifically, my workflow involves extracting all relevant cell and nodal data from Fluent, using this data to develop a reduced order model, and then updating the mesh solution with predictions from the model.

The main issues I am facing include:

Exporting CFD data in a format that contains all mesh data, including predefined surface names from the meshing stage, as well as solution data such as temperature and velocity components.
Updating the mesh with the predicted solution data from my reduced order model for visualization and post-processing purposes.
I have tried exporting case and data files from Fluent, but when visualizing these in ParaView, the application crashes while reading the case files. Additionally, I have exported CGNS files from Fluent, but these do not include the internal named selections that I have defined.

Furthermore, I have explored using PyVista; however, the named surfaces from my mesh do not appear. I also looked into Meshio, but it does not support my multi-region mesh used in conjugate heat transfer simulations and throws an error.

For 3D cases, I have used .cgns files from Fluent and I am able to update it, but I have no way of knowing whether the data is getting updated at the correct node/cell. Additionally, I do not have access to the internal named surfaces that I have defined at the meshing stage.

Ideally, I would like to:

Load files from Fluent.
Extract and organize the data needed to build my reduced order model from multiple CFD simulations, each having the same mesh but different solutions due to varying boundary conditions.
Use the model to predict the solution.
Update or map the new solution back onto the mesh.
Use the updated file to identify the nodal values at the predefined named surface locations in the mesh and calculate average temperature values for further use in my workflow.
I came across some information while researching the documentation for the vtkFLUENTReader class and various ParaView and Fluent visualization threads on the internet. Given my limited experience with the backend aspects of meshing and data manipulation, I am seeking guidance on the ideal workflow for these tasks. Specifically, I would appreciate any advice on:

The best practices for exporting 3D CFD data from Fluent.
Methods for updating the mesh solution with new data for visualization and post-processing.
Any tools or software recommendations that could simplify this process.
I am not a software developer, and I would be extremely grateful for any direction or resources that could help me achieve these goals. Any expertise and insights would be invaluable to my research.

Thank you very much for your time and consideration.
romi is offline   Reply With Quote

Old   May 31, 2024, 14:25
Default
  #2
Senior Member
 
sbaffini's Avatar
 
Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 2,192
Blog Entries: 29
Rep Power: 39
sbaffini will become famous soon enoughsbaffini will become famous soon enough
Send a message via Skype™ to sbaffini
Quote:
Originally Posted by romi View Post
Hello everyone,

I hope this message finds you well. I am currently working on a project focused on building non-intrusive (data-driven) reduced order models for CFD simulations using Fluent as my solver.

While I have successfully managed to extract and work with cell/nodal data from 2D simulations, I am encountering challenges with implementing this for 3D cases. Specifically, my workflow involves extracting all relevant cell and nodal data from Fluent, using this data to develop a reduced order model, and then updating the mesh solution with predictions from the model.

The main issues I am facing include:

Exporting CFD data in a format that contains all mesh data, including predefined surface names from the meshing stage, as well as solution data such as temperature and velocity components.
Updating the mesh with the predicted solution data from my reduced order model for visualization and post-processing purposes.
I have tried exporting case and data files from Fluent, but when visualizing these in ParaView, the application crashes while reading the case files. Additionally, I have exported CGNS files from Fluent, but these do not include the internal named selections that I have defined.

Furthermore, I have explored using PyVista; however, the named surfaces from my mesh do not appear. I also looked into Meshio, but it does not support my multi-region mesh used in conjugate heat transfer simulations and throws an error.

For 3D cases, I have used .cgns files from Fluent and I am able to update it, but I have no way of knowing whether the data is getting updated at the correct node/cell. Additionally, I do not have access to the internal named surfaces that I have defined at the meshing stage.

Ideally, I would like to:

Load files from Fluent.
Extract and organize the data needed to build my reduced order model from multiple CFD simulations, each having the same mesh but different solutions due to varying boundary conditions.
Use the model to predict the solution.
Update or map the new solution back onto the mesh.
Use the updated file to identify the nodal values at the predefined named surface locations in the mesh and calculate average temperature values for further use in my workflow.
I came across some information while researching the documentation for the vtkFLUENTReader class and various ParaView and Fluent visualization threads on the internet. Given my limited experience with the backend aspects of meshing and data manipulation, I am seeking guidance on the ideal workflow for these tasks. Specifically, I would appreciate any advice on:

The best practices for exporting 3D CFD data from Fluent.
Methods for updating the mesh solution with new data for visualization and post-processing.
Any tools or software recommendations that could simplify this process.
I am not a software developer, and I would be extremely grateful for any direction or resources that could help me achieve these goals. Any expertise and insights would be invaluable to my research.

Thank you very much for your time and consideration.
Before delving more into it, let me say that there is very little chances to go trough all this without getting your hands very dirty in coding.

The main reason is that, according to my experience, every Fluent reader out there which is not from Ansys is pretty much limited to do the minimum necessary for visualization. In any case, it's difficult that someone has a full fledged reader that can cover every aspect of Fluent.

So, you can either learn to directly read Fluent case and data files or find a way to make Fluent write the data you need in an easier format to read. Then you probably need to also convert that data to some other format for further automatic elaboration.

The way to put data into Fluent depends from what you need to do with it, and typically involves an UDF or initialization files. But, there is no point to do this only for visualization, just export to something readable by paraview. This is also because Fluent visualization is linked to the way it processes things and so, say, what you see on surfaces after doing this upload might not correspond to cell values no matter what (and Fluent only allows to load cell values)
sbaffini is offline   Reply With Quote

Old   May 31, 2024, 16:33
Default
  #3
New Member
 
Naruto Uzumaki
Join Date: Dec 2023
Posts: 3
Rep Power: 2
romi is on a distinguished road
Quote:
Originally Posted by sbaffini View Post
Before delving more into it, let me say that there is very little chances to go trough all this without getting your hands very dirty in coding.

The main reason is that, according to my experience, every Fluent reader out there which is not from Ansys is pretty much limited to do the minimum necessary for visualization. In any case, it's difficult that someone has a full fledged reader that can cover every aspect of Fluent.

So, you can either learn to directly read Fluent case and data files or find a way to make Fluent write the data you need in an easier format to read. Then you probably need to also convert that data to some other format for further automatic elaboration.

The way to put data into Fluent depends from what you need to do with it, and typically involves an UDF or initialization files. But, there is no point to do this only for visualization, just export to something readable by paraview. This is also because Fluent visualization is linked to the way it processes things and so, say, what you see on surfaces after doing this upload might not correspond to cell values no matter what (and Fluent only allows to load cell values)
Will it be a good idea to start looking into OpenFoam for this purpose?
romi is offline   Reply With Quote

Old   May 31, 2024, 17:47
Default
  #4
Senior Member
 
sbaffini's Avatar
 
Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 2,192
Blog Entries: 29
Rep Power: 39
sbaffini will become famous soon enoughsbaffini will become famous soon enough
Send a message via Skype™ to sbaffini
I don't expect the coding with OF to be less, maybe more, in theory. In practice, there might have been a lot of people who have already done and shared what you need, so you might end up doing less coding.

But this is purely aneddotical. Any time I delve into OF is always with the mood "someone must surely have attempted this in the last 20 years, this is the ABC of CFD". I sistematically leave with "f..k these people, f..k this code, I'm done". So, don't bet on it, unless you are willing to invest an inordinate amount of time.

However, I don't think there should be relevant differences between 2D and 3D. If you have 2D already working, unless it does completely different things, you should stay on your path and make it work in 3D as well
sbaffini is offline   Reply With Quote

Reply

Tags
data export, digital twin, paraview, pod, reduced order model


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 23:50.