CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > SU2

Can SU2 output the thermal conductivity field and diffusion heat flux on the wall?

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By Iniesta8
  • 1 Post By Iniesta8

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 13, 2023, 21:06
Default Can SU2 output the thermal conductivity field and diffusion heat flux on the wall?
  #1
New Member
 
Dengke Li
Join Date: Dec 2022
Posts: 16
Rep Power: 3
Iniesta8 is on a distinguished road
Hello all,
I am new to SU2. And I want to use it to do a simulation of a hypersonic cylinder flow with a catalytic wall boundary condition. I can only get the total wall heat flux now, but the diffusion heat flux is also important. So anyone knows how to output the diffusion heat flux? And if possible, I also want to output the thermal conductivity, diffusion flux, and total enthalpy fields.
Any help will be appreciated.
Iniesta8 is offline   Reply With Quote

Old   January 14, 2023, 08:04
Default
  #2
Member
 
PENG YAN
Join Date: Jul 2021
Location: Italy
Posts: 34
Rep Power: 5
PENGGEGE777 is on a distinguished road
Just read SU2_CFD/src/output/CFlowCompOutput.cpp, learn how Pressure is output.



Then you can modify the code and output anything you want.


Best wishes.
PENGGEGE777 is offline   Reply With Quote

Old   January 14, 2023, 08:05
Default
  #3
New Member
 
Dengke Li
Join Date: Dec 2022
Posts: 16
Rep Power: 3
Iniesta8 is on a distinguished road
Quote:
Originally Posted by PENGGEGE777 View Post
Just read SU2_CFD/src/output/CFlowCompOutput.cpp, learn how Pressure is output.



Then you can modify the code and output anything you want.


Best wishes.
Thanks, I will have a try.
Iniesta8 is offline   Reply With Quote

Old   January 15, 2023, 03:51
Default
  #4
Senior Member
 
bigfoot
Join Date: Dec 2011
Location: Netherlands
Posts: 620
Rep Power: 18
bigfootedrockmidget is on a distinguished road
see also https://github.com/su2code/SU2/pull/1889
bigfootedrockmidget is offline   Reply With Quote

Old   January 15, 2023, 04:23
Default
  #5
New Member
 
Dengke Li
Join Date: Dec 2022
Posts: 16
Rep Power: 3
Iniesta8 is on a distinguished road
Quote:
Originally Posted by bigfootedrockmidget View Post
Yes, I have seen it. Thanks for your efforts.
Iniesta8 is offline   Reply With Quote

Old   January 15, 2023, 04:37
Default
  #6
New Member
 
Dengke Li
Join Date: Dec 2022
Posts: 16
Rep Power: 3
Iniesta8 is on a distinguished road
Quote:
Originally Posted by bigfootedrockmidget View Post
BTW, if I want to output other variables in the future. Emm... ,maybe something not most users needed, like gamma, Cv, Cp. Just add codes in CNEMOCompOutput.cpp to call functions AddVolumeOutput() and SetVolumeOutputValue() and then rebuild. Is it right?
Iniesta8 is offline   Reply With Quote

Old   January 15, 2023, 05:57
Default
  #7
Senior Member
 
bigfoot
Join Date: Dec 2011
Location: Netherlands
Posts: 620
Rep Power: 18
bigfootedrockmidget is on a distinguished road
yes, if the variable can be retrieved from Node_Flow, you do this in SetVolumeOutputValue:
Code:
Cp: Node_Flow->GetSpecificHeatCp
 Cv: Node_Flow->GetSpecificHeatCv
Gamma is not stored in node_flow, so you'll have to get it from Cp and Cv.

For development, I recommend using vscode. It also has autocomplete, so if you type
Code:
Node_Flow->
then it will give you a list of all functions, so you immediately see that
Code:
Node_Flow->GetSpecificHeatCp
is an existing function.


EDIT: the available variables depend on the solver, not every solver has the same functionality

Last edited by bigfootedrockmidget; January 17, 2023 at 15:54.
bigfootedrockmidget is offline   Reply With Quote

Old   January 15, 2023, 06:15
Default
  #8
New Member
 
Dengke Li
Join Date: Dec 2022
Posts: 16
Rep Power: 3
Iniesta8 is on a distinguished road
Quote:
Originally Posted by bigfootedrockmidget View Post
yes, if the variable can be retrieved from Node_Flow, you do this in SetVolumeOutputValue:
Code:
Cp: Node_Flow->GetSpecificHeatCp
 Cv: Node_Flow->GetSpecificHeatCv
Gamma is not stored in node_flow, so you'll have to get it from Cp and Cv.

For development, I recommend using vscode. It also has autocomplete, so if you type
Code:
Node_Flow->
then it will give you a list of all functions, so you immediately see that
Code:
Node_Flow->GetSpecificHeatCp
is an existing function.
Yes, I am using vscode. Your suggestion is very useful for me, thanks.
Iniesta8 is offline   Reply With Quote

Old   January 17, 2023, 08:49
Default
  #9
Senior Member
 
Wally Maier
Join Date: Apr 2019
Posts: 123
Rep Power: 7
wallym is on a distinguished road
Hi All,

In NEMO, gamma is stored in at the node level and can be accessed via:
"Node_Flow->GetGamma(iPoint)"

On the other hand the Cp and Cv functions do not exist
wallym is offline   Reply With Quote

Old   January 17, 2023, 09:01
Default
  #10
New Member
 
Dengke Li
Join Date: Dec 2022
Posts: 16
Rep Power: 3
Iniesta8 is on a distinguished road
Quote:
Originally Posted by wallym View Post
Hi All,

In NEMO, gamma is stored in at the node level and can be accessed via:
"Node_Flow->GetGamma(iPoint)"

On the other hand the Cp and Cv functions do not exist
Hi Wally,
Thanks for the reminder. So that's the point. For I just found that when I add Cp and Cv in the outputs it always returns a zero constant flowfield.
Iniesta8 is offline   Reply With Quote

Old   January 17, 2023, 09:50
Default
  #11
New Member
 
Dengke Li
Join Date: Dec 2022
Posts: 16
Rep Power: 3
Iniesta8 is on a distinguished road
Quote:
Originally Posted by wallym View Post
Hi All,

In NEMO, gamma is stored in at the node level and can be accessed via:
"Node_Flow->GetGamma(iPoint)"

On the other hand the Cp and Cv functions do not exist
Hi Wally
When I use "Node_Flow->GetGamma(iPoint)" to get Gamma. It reminds me that "class "CVariable" has no member "GetGamma". Then I add GetGamma() in CVariable.hpp via
"inline virtual su2double GetGamma(unsigned long iPoint) const { return 0.0; }"
"inline virtual void SetGamma(unsigned long iPoint, su2double Gamma) {}"
But it doesn't work. The Gamma in output is always 0.
Iniesta8 is offline   Reply With Quote

Old   January 17, 2023, 11:53
Default
  #12
Senior Member
 
Wally Maier
Join Date: Apr 2019
Posts: 123
Rep Power: 7
wallym is on a distinguished road
Hmmm,
The GetGamma function (for your use) is only defined in the NEMO solver:
" /*!
* \brief Returns the stored value of Gamma at the specified node
*/
inline su2double GetGamma(unsigned long iPoint) { return Gamma(iPoint); }
"
wallym is offline   Reply With Quote

Old   January 17, 2023, 16:13
Default
  #13
Senior Member
 
bigfoot
Join Date: Dec 2011
Location: Netherlands
Posts: 620
Rep Power: 18
bigfootedrockmidget is on a distinguished road
Yes, It's a bit confusing because GetGamma() is part of the CNEMOEulerVariable class, but in the NEMO output, the flow_nodes belong to CVariable, so it's a bit more complicated than simply adding 2 lines.
bigfootedrockmidget is offline   Reply With Quote

Old   January 18, 2023, 06:26
Default
  #14
New Member
 
Dengke Li
Join Date: Dec 2022
Posts: 16
Rep Power: 3
Iniesta8 is on a distinguished road
Quote:
Originally Posted by bigfootedrockmidget View Post
Yes, It's a bit confusing because GetGamma() is part of the CNEMOEulerVariable class, but in the NEMO output, the flow_nodes belong to CVariable, so it's a bit more complicated than simply adding 2 lines.
Hi
Could you give me some tips to allow GetGamma() used in NEMO output?
Tomjugj likes this.
Iniesta8 is offline   Reply With Quote

Reply


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
UDF for electric flux in diffusion Achini Fluent UDF and Scheme Programming 2 April 25, 2021 01:30
Coupled Heat and Mass Transfer Mecroob OpenFOAM Running, Solving & CFD 1 July 12, 2020 19:24
Turbulent Diffusion for Temperature Equation Tobi OpenFOAM Programming & Development 6 July 8, 2019 03:28
Moving mesh Niklas Wikstrom (Wikstrom) OpenFOAM Running, Solving & CFD 122 June 15, 2014 06:20
Convergence moving mesh lr103476 OpenFOAM Running, Solving & CFD 30 November 19, 2007 14:09


All times are GMT -4. The time now is 00:08.