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

Seeking Assistance with SU2 Simulation Implementation

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 28, 2024, 05:17
Unhappy Seeking Assistance with SU2 Simulation Implementation
  #1
Member
 
Sean
Join Date: May 2023
Posts: 41
Rep Power: 2
bgulzar22 is on a distinguished road
Dear SU2 Community,

I am currently working on implementing a simulation using SU2 and have encountered a challenge that I hope some of you might be able to assist with. Below is a brief overview of my problem:

Problem Overview:
I am working on a simulation that involves setting custom temperature boundary condition on a specific marker using Python scripting. However, I'm facing difficulties in properly setting this boundary condition based on temperature data from an external file. I have written a Python script to read the temperature data, assign it to the appropriate marker, and run the simulation. However, despite my efforts, I am encountering issues with the implementation.

To provide more context and allow for a better understanding of the problem, I have prepared a comprehensive package containing the following:

Configuration file
Mesh file
Temperature data file
Python script for setting the boundary condition and running the simulation
You can access the files package through this link:https://drive.google.com/drive/folde...usp=drive_link

Request for Assistance:
I am reaching out to the SU2 community in the hopes that someone with expertise in Python scripting for SU2 simulations can review my implementation and provide insights into resolving the issues I'm facing. Specifically, I would greatly appreciate any guidance or suggestions on how to properly set the custom temperature boundary conditions using Python scripting.

If anyone is willing to lend their expertise and offer assistance, I would be extremely grateful. Your support would not only help me overcome this obstacle but also contribute to advancing my understanding and proficiency in utilizing SU2 for my simulations.

Thank you in advance for your time and assistance.

Best regards,
bgulzar22 is offline   Reply With Quote

Old   March 28, 2024, 10:52
Default
  #2
Senior Member
 
bigfoot
Join Date: Dec 2011
Location: Netherlands
Posts: 504
Rep Power: 17
bigfootedrockmidget is on a distinguished road
I haven't looked at your setup, but the way I would have done it is take this case as a starting point:
https://github.com/su2code/SU2/blob/...T_FlatPlate.py


Then change the time-dependent temperature BC for a spatially dependent BC using something like this:
Code:
marker_coords = driver.MarkerCoordinates(marker_id) 
x = marker_coords(i_vertex, 0) 
y = marker_coords(i_vertex, 1)
temperature = temperature_function(x,y)
And in your case read your file in temperature_function and interpolate the values at (x,y)
bigfootedrockmidget is offline   Reply With Quote

Old   March 28, 2024, 15:13
Default
  #3
Senior Member
 
bigfoot
Join Date: Dec 2011
Location: Netherlands
Posts: 504
Rep Power: 17
bigfootedrockmidget is on a distinguished road
It looks like you are doing something similar so first take take the working testcase from the repository, verify that it works, then modify it so it uses spatially varying temperature. Just T=x+y or something simple like that. Then get temperature from a file. Verify all intermediate steps.
bigfootedrockmidget is offline   Reply With Quote

Old   March 29, 2024, 04:17
Default
  #4
Member
 
Sean
Join Date: May 2023
Posts: 41
Rep Power: 2
bgulzar22 is on a distinguished road
Quote:
Originally Posted by bigfootedrockmidget View Post
It looks like you are doing something similar so first take take the working testcase from the repository, verify that it works, then modify it so it uses spatially varying temperature. Just T=x+y or something simple like that. Then get temperature from a file. Verify all intermediate steps.
Thank you for your response , I have run the test case for unsteady one, test case works fine but when I try to run my case I face a segmentation error. Could you please look into it and please let me know where does the fault lie , and what mistake I am making. Please I would be grateful.
bgulzar22 is offline   Reply With Quote

Old   March 29, 2024, 05:19
Default
  #5
Senior Member
 
bigfoot
Join Date: Dec 2011
Location: Netherlands
Posts: 504
Rep Power: 17
bigfootedrockmidget is on a distinguished road
Does your code run fine when you just set temperature=300 in your python script?
Does your code run fine when you set temperature=300+x+y ?
bigfootedrockmidget is offline   Reply With Quote

Old   March 29, 2024, 05:24
Default
  #6
Member
 
Sean
Join Date: May 2023
Posts: 41
Rep Power: 2
bgulzar22 is on a distinguished road
Quote:
Originally Posted by bigfootedrockmidget View Post
Does your code run fine when you just set temperature=300 in your python script?
Does your code run fine when you set temperature=300+x+y ?
No, I get the same segmentation error when I run the python script, but when I run the simulation without the python script , it runs fine with isothermal boundary condition.
bgulzar22 is offline   Reply With Quote

Old   March 29, 2024, 07:43
Default
  #7
Member
 
Sean
Join Date: May 2023
Posts: 41
Rep Power: 2
bgulzar22 is on a distinguished road
Quote:
Originally Posted by bigfootedrockmidget View Post
Does your code run fine when you just set temperature=300 in your python script?
Does your code run fine when you set temperature=300+x+y ?
Now the simulation works when I use the updated python script https://drive.google.com/file/d/13M6...usp=drive_link
but I am not sure if it is using temperature distribution correctly. As in my simulation I have given temperature at WALL as 421K(ISOTHERMAL BC). Could you suggest me a way, so that I can check whether the updated temperature distribution is applied on the WALL.
Thank YOU in advance.
bgulzar22 is offline   Reply With Quote

Reply

Tags
cht coupling, cht problem, python script, python script error, python wrapper


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
SU2 Supersonic Cascade Simulation: Inlet Boundary Condition Issues nirvananas314 SU2 4 March 15, 2024 09:13
Seeking Surface Heat Flux Validation for SU2 bgulzar22 SU2 0 November 25, 2023 22:09
Help Needed: Rocket Nozzle Erosion Simulation Using SU2 bgulzar22 SU2 2 August 28, 2023 08:06
Making Sure SU2 reads the restart_flow.dat to restart a simulation pro_ SU2 0 April 10, 2020 05:44
Engine simulation (seeking help with method to use) Geoff Rathbun Main CFD Forum 4 April 13, 1999 14:19


All times are GMT -4. The time now is 18:54.