|
[Sponsors] |
![]() |
![]() |
#1 |
New Member
Joshua McBeth
Join Date: Feb 2025
Posts: 3
Rep Power: 2 ![]() |
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! |
|
![]() |
![]() |
![]() |
![]() |
#2 |
Senior Member
bigfoot
Join Date: Dec 2011
Location: Netherlands
Posts: 775
Rep Power: 21 ![]() |
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 |
|
![]() |
![]() |
![]() |
![]() |
#3 |
New Member
Joshua McBeth
Join Date: Feb 2025
Posts: 3
Rep Power: 2 ![]() |
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.
|
|
![]() |
![]() |
![]() |
![]() |
#4 |
Senior Member
bigfoot
Join Date: Dec 2011
Location: Netherlands
Posts: 775
Rep Power: 21 ![]() |
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.
|
|
![]() |
![]() |
![]() |
![]() |
#5 |
New Member
Joshua McBeth
Join Date: Feb 2025
Posts: 3
Rep Power: 2 ![]() |
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?
|
|
![]() |
![]() |
![]() |
![]() |
#6 |
Senior Member
bigfoot
Join Date: Dec 2011
Location: Netherlands
Posts: 775
Rep Power: 21 ![]() |
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?
|
|
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
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 |