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

Varying Heat Flux using MARKER_HEATFLUX

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 4, 2025, 12:23
Default Varying Heat Flux using MARKER_HEATFLUX
  #1
New Member
 
Joshua McBeth
Join Date: Feb 2025
Posts: 3
Rep Power: 2
JoshMcBeth is on a distinguished road
I am running an unsteady CFD code for a ramjet. The code currently simulates heat flux from a wall at a constant value. However, now I am adapting the code and want to ramp up the heat flux at the wall every restart. To do this I already have two files which is currently trying to open and append the value for heat flux which is located within the MARKER_HEATFLUX function that SU2 operates.

However, when I run the code, I keep receiving this error and after many failed attempts at resolving it, I am hoping someone can direct me as to what I can do to get around this error? I have posted an image of the printed error as well as the section of code in my setup file relevant to this question for some clarity.

Capture.jpg
Capture(2).JPG

Any help is much appreciated!
JoshMcBeth is offline   Reply With Quote

Old   February 4, 2025, 13:01
Default
  #2
Senior Member
 
bigfoot
Join Date: Dec 2011
Location: Netherlands
Posts: 775
Rep Power: 21
bigfootedrockmidget is on a distinguished road
How do you update the INIT_HEAT_FLUX value? The heat flux boundary condition needs to have the form (string,value,string,value,string,value) and now one of your values is a string INIT_HEAT_FLUX.


By the way, you can also do this using python, here is an example:
https://github.com/su2code/SU2/blob/...flux/run_ad.py
bigfootedrockmidget is offline   Reply With Quote

Old   February 4, 2025, 13:13
Default
  #3
New Member
 
Joshua McBeth
Join Date: Feb 2025
Posts: 3
Rep Power: 2
JoshMcBeth is on a distinguished road
Hello! I have INIT_HEAT_FLUX setup as a user defined function within my code. I have tried this way and just simply defining it as a variable. If you see the line about the MARKER HEATFLUX. I commented it out to try the latter method.
JoshMcBeth is offline   Reply With Quote

Old   February 4, 2025, 16:51
Default
  #4
Senior Member
 
bigfoot
Join Date: Dec 2011
Location: Netherlands
Posts: 775
Rep Power: 21
bigfootedrockmidget is on a distinguished road
So do you then have a bash script where you do something like sed -i 's/INIT_HEAT_FLUX/value' file.cfg to replace INIT_HEAT_FLUX with a real number like 1.234? It looks to me that by the time you start SU2_CFD, your script did not properly replace the placeholder INIT_HEAT_FLUX with a number, hence the error.
bigfootedrockmidget is offline   Reply With Quote

Old   February 4, 2025, 17:46
Default
  #5
New Member
 
Joshua McBeth
Join Date: Feb 2025
Posts: 3
Rep Power: 2
JoshMcBeth is on a distinguished road
I see! I do not know how to do that.. is there a directory I can find that or is are you talking about just replacing it with a coded python script?
JoshMcBeth is offline   Reply With Quote

Old   February 5, 2025, 13:45
Default
  #6
Senior Member
 
bigfoot
Join Date: Dec 2011
Location: Netherlands
Posts: 775
Rep Power: 21
bigfootedrockmidget is on a distinguished road
You can use sed in bash or python. Or use any other method to do string replacement in a file. So if this is the only thing you need to do then your script should only consist of a line doing the replacement and a line making the call to su2_cfd, so what am I missing here? What kind of script do you currently have? Can you share it?
bigfootedrockmidget is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Simulating constant heat flux value at solid-solid boundary Y27 STAR-CCM+ 6 September 8, 2020 09:56
Udf for moving heat flux in 2D cylindrical geometry devia21 Fluent UDF and Scheme Programming 0 April 20, 2015 00:27
time varying heat flux boundary condtion xishan555 OpenFOAM Programming & Development 1 February 26, 2015 09:33
Heat Flux at wall in a conjugate heat transfer problem Chander CFX 2 July 9, 2011 22:22
Linearly varying heat flux Ankit Tayal FLUENT 1 April 16, 2006 10:12


All times are GMT -4. The time now is 02:49.