CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   SU2 (https://www.cfd-online.com/Forums/su2/)
-   -   Applying Spatially Varying Temperature on Nozzle Wall in SU2 Simulation (https://www.cfd-online.com/Forums/su2/254338-applying-spatially-varying-temperature-nozzle-wall-su2-simulation.html)

bgulzar22 February 3, 2024 01:46

Applying Spatially Varying Temperature on Nozzle Wall in SU2 Simulation
 
Hello CFD community,

I am working on a compressible fluid flow simulation using SU2, and I am currently facing a challenge in applying a spatially varying temperature on the nozzle wall. I initially used the isothermal condition, but now I need to introduce a more realistic temperature distribution along the nozzle wall.

Could someone provide guidance on how to modify the SU2 configuration file to implement a spatially varying temperature profile?
I appreciate any insights or examples that can help me achieve this in SU2. Thank you!

bigfootedrockmidget February 3, 2024 03:34

You can do this with the python wrapper. There are a couple of examples for unsteady spatially changing wall temperature and heat flux in the testcases repository:
https://github.com/su2code/SU2/tree/...ses/py_wrapper
A presentation on the python wrapper:

https://www.youtube.com/watch?v=tEDPWybcrfs

bgulzar22 February 3, 2024 03:47

Quote:

Originally Posted by bigfootedrockmidget (Post 864192)
You can do this with the python wrapper. There are a couple of examples for unsteady spatially changing wall temperature and heat flux in the testcases repository:
https://github.com/su2code/SU2/tree/...ses/py_wrapper
A presentation on the python wrapper:

https://www.youtube.com/watch?v=tEDPWybcrfs

Thank you for the suggestions. I will look into it and update accordingly.

bgulzar22 February 16, 2024 11:59

Applying Spatially Varying Temperature Profile on Nozzle Wall in SU2
 
Quote:

Originally Posted by bigfootedrockmidget (Post 864192)
You can do this with the python wrapper. There are a couple of examples for unsteady spatially changing wall temperature and heat flux in the testcases repository:
https://github.com/su2code/SU2/tree/...ses/py_wrapper
A presentation on the python wrapper:

https://www.youtube.com/watch?v=tEDPWybcrfs

I have successfully installed the pywrapper, and now I am seeking assistance on how to apply the temperature profile obtained from an in-house material response code to the SU2 flow simulation.

Here is a brief overview of my current setup:

I am running a steady flow simulation in SU2.

The boundary conditions in my configuration file include an isothermal temperature on the nozzle wall, as follows:

Code:

MARKER_ISOTHERMAL = (WALL, 315)
I obtain the heat flux from the SU2 simulation and use it as input to an in-house material response code, which provides the corresponding temperature distribution on the nozzle wall.
Now, I want to incorporate this spatially varying temperature profile back into the SU2 simulation. Could you please guide me on how to modify the SU2 configuration file or use the Python wrapper to implement this temperature distribution on the nozzle wall?

I would appreciate any insights, examples, or step-by-step instructions that could help me achieve this. Thank you in advance for your assistance!

bigfootedrockmidget February 17, 2024 09:34

There is an example in the directory Testcases/py_wrapper/flatplate_unsteady_CHT, First run this one to see if everything is working for you.


This case is for a time dependent wall temperature. But if you get the coordinates of the vertices:
Code:

MarkerCoords = SU2Driver.MarkerCoordinates(MarkerID)

x = MarkerCoords(iVertex, 0)
y = MarkerCoords(iVertex, 1)



You can use it for spatially varying temperature when you know T(x,y)

bgulzar22 February 17, 2024 11:26

Quote:

Originally Posted by bigfootedrockmidget (Post 864869)
There is an example in the directory Testcases/py_wrapper/flatplate_unsteady_CHT, First run this one to see if everything is working for you.


This case is for a time dependent wall temperature. But if you get the coordinates of the vertices:
Code:

MarkerCoords = SU2Driver.MarkerCoordinates(MarkerID)

x = MarkerCoords(iVertex, 0)
y = MarkerCoords(iVertex, 1)



You can use it for spatially varying temperature when you know T(x,y)

Thank you bigfoot. Yeah I will try this one and see how I can improve on it. Thank you.

bgulzar22 March 26, 2024 05:32

Quote:

Originally Posted by bigfootedrockmidget (Post 864869)
There is an example in the directory Testcases/py_wrapper/flatplate_unsteady_CHT, First run this one to see if everything is working for you.


This case is for a time dependent wall temperature. But if you get the coordinates of the vertices:
Code:

MarkerCoords = SU2Driver.MarkerCoordinates(MarkerID)

x = MarkerCoords(iVertex, 0)
y = MarkerCoords(iVertex, 1)



You can use it for spatially varying temperature when you know T(x,y)

Dear bigfoot,

I attempted to implement the approach you recommended, but unfortunately, I am still encountering some issues. I have attached my Python script, as well as the corresponding configuration (cfg) and mesh files for your review. https://drive.google.com/drive/folde...7L?usp=sharing
Could you please take a look at my script and help me identify any errors I may have made?

Your guidance would be greatly appreciated.


All times are GMT -4. The time now is 09:52.