Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,16 @@ defaults:
sectionid: vandv
seo:
type: "WebPage"

- scope:
path: _su2gui
type: su2gui
values:
layout: su2gui
sectionid: su2gui
seo:
type: "WebPage"

collections:
docs:
permalink: /:collection/:path/
Expand All @@ -89,6 +99,9 @@ collections:
vandv:
permalink: /:collection/:path/
output: true
su2gui:
permalink: /:collection/:path/
output: true
posts:
permalink: /blog/:year/:month/:day/:title/
output: true
Expand Down
19 changes: 19 additions & 0 deletions _data/su2gui.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
- title: Introduction to SU2GUI
su2gui:
- Introduction
- Quick-Start

- title: Installation
su2gui:
- Installation

- title: User Guide
su2gui:
- Terminal-Initialization
- Manage-Cases
- Mesh-File
- configurations
- Initialization
- Logs-Errors
- Result-Analysis
- Supported-Functionalities
22 changes: 22 additions & 0 deletions _includes/su2gui_nav.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true">
{% for section in site.data.su2gui %}
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">
<a role="button" data-toggle="collapse" data-parent="#accordion" href="#collapse-{{forloop.index}}" aria-expanded="false" aria-controls="collapse-{{forloop.index}}">
{{ section.title }}
</a>
</h4>
</div>
<div id="collapse-{{forloop.index}}" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingOne">
<ul class="list-group">
{% for item in section.su2gui %}
{% assign item_url = item | prepend:"/su2gui/" | append:"/" %}
{% assign p = site.su2gui | where:"url", item_url | first %}
<a class="list-group-item {% if item_url == page.url %}active{% endif %}" href="{{ p.url | relative_url }}">{{ p.title }}</a>
{% endfor %}
</ul>
</div>
</div>
{% endfor %}
</div>
52 changes: 52 additions & 0 deletions _includes/su2gui_section_nav.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{% comment %}
Map grabs the doc sections, giving us an array of arrays. Join, flattens all
the items to a comma delimited string. Split turns it into an array again.
{% endcomment %}
{% assign su2gui = site.data.su2gui | map: 'su2gui' | join: ',' | split: ',' %}

{% comment %}
Because this is built for every page, lets find where we are in the ordered
document list by comparing url strings. Then if there's something previous or
next, lets build a link to it.
{% endcomment %}

{% for document in su2gui %}
{% assign document_url = document | prepend:"/su2gui/" | append:"/" %}
{% if document_url == page.url %}
<ul class="pager">
{% if forloop.first %}
<li class="previous disabled">
<a>
<span aria-hidden="true">&larr;</span> Previous
</a>
</li>
{% else %}
{% assign previous = forloop.index0 | minus: 1 %}
{% assign previous_page = su2gui[previous] | prepend:"/su2gui/" | append:"/" %}
<li class="previous">
<a href="{{ previous_page | relative_url }}">
<span aria-hidden="true">&larr;</span> Previous
</a>
</li>
{% endif %}

{% if forloop.last %}
<li class="next disabled">
<a>
Next <span aria-hidden="true">&rarr;</span>
</a>
</li>
{% else %}
{% assign next = forloop.index0 | plus: 1 %}
{% assign next_page = su2gui[next] | prepend:"/su2gui/" | append:"/" %}
<li class="next">
<a href="{{ next_page | relative_url }}">
Next <span aria-hidden="true">&rarr;</span>
</a>
</li>
{% endif %}
</div>
<div class="clear"></div>
{% break %}
{% endif %}
{% endfor %}
1 change: 1 addition & 0 deletions _includes/topnav.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
<li {% if page.sectionid=='forum' %} class="active" {% endif %}><a href="{{ "https://www.cfd-online.com/Forums/su2/" }}">User Forum</a></li>
<li {% if page.sectionid=='slack' %} class="active" {% endif %}><a href="{{ "https://join.slack.com/t/su2devteam/shared_invite/zt-af0uuqf8-8XNExKMV9G~UVsnkvi5uVA" }}">Dev Team Slack</a></li>
<li {% if page.sectionid=='develop' %} class="active" {% endif %}><a href="{{ "/develop.html" relative_url }}">Develop</a></li>
<li {% if page.sectionid=='su2gui' %} class="active" {% endif %}><a href="{{ "/su2gui/introduction" relative_url }}">GUI</a></li>
</ul>
<div class="navbar-right">
<ul class="nav navbar-nav">
Expand Down
55 changes: 55 additions & 0 deletions _layouts/su2gui.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
---
layout: default
---

<div class="container">
<div class="row">
<div class="col-md-4">
{% include su2gui_nav.html %}
</div>

<div class="col-md-8">
<h1>{{ page.title }}</h1>
<div id="markdown-content-container">{{ content }}</div>
<hr>
{% unless true %}
<script>

/**
* RECOMMENDED CONFIGURATION VARIABLES: EDIT AND UNCOMMENT THE SECTION BELOW TO INSERT DYNAMIC VALUES FROM YOUR PLATFORM OR CMS.
* LEARN WHY DEFINING THESE VARIABLES IS IMPORTANT: https://disqus.com/admin/universalcode/#configuration-variables*/
/*
var disqus_config = function () {
this.page.url = PAGE_URL; // Replace PAGE_URL with your page's canonical URL variable
this.page.identifier = PAGE_IDENTIFIER; // Replace PAGE_IDENTIFIER with your page's unique identifier variable
};
*/
(function() { // DON'T EDIT BELOW THIS LINE
var d = document, s = d.createElement('script');
s.src = 'https://su2code-github-io.disqus.com/embed.js';
s.setAttribute('data-timestamp', +new Date());
(d.head || d.body).appendChild(s);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>


<div id="disqus_thread"></div>
<hr>
{% endunless %}
<p class="text-center">
<br />
<a target="_blank" href="{{site.git_edit_address}}/{{ page.path }}" class="btn btn-default githubEditButton" role="button">
<i class="fa fa-pencil fa-lg"></i> Improve this page
</a>
</p>
{% include su2gui_section_nav.html %}
</div>

</div>
</div>

<!-- Mathjax Support -->
<script type="text/javascript" async
src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
20 changes: 20 additions & 0 deletions _su2gui/Build-From-Source.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
title: Build From Source
permalink: /su2gui/Build-From-Source/
---

This section guides you through using the source code to run SU2GUI on your device, enabling custom changes and optimizations.

### Minimal Requirements

- Python 3
- SU2 Software
- Python Libraries listed in [requirements.txt](Link)

### Installation and Setup

Clone the source code from our [GitHub repository](Link). Navigate to the root folder and run `su2gui.py`. You can also pass additional options or create your custom terminal arguments.

### Command to Start the Server

usage: python su2gui.py [-h] [-p PORT] [-c CASE] [-m MESH] [--config CONFIG] [--restart RESTART]
48 changes: 48 additions & 0 deletions _su2gui/Configurations.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
title: Configurations
permalink: /su2gui/configurations/
---

This section explains how to use the configuration file and Config Tab in SU2GUI. For an overview of what a configuration file is, please refer to the [configuration file](../../docs_v7/Configuration-File/) page.

## Loading a Configuration File
SU2GUI allows users to load a configuration file through both the GUI and the terminal. Loading the file is optional, as SU2GUI will create one if the user does not provide it. Before doing so, it is necessary for the user to initialize a Case. It is recommended to load the mesh file before the configuration file to set boundary condition properties and ensure proper functionality.

**Steps to load configuration file:**

1. Start a new case and load mesh file. Follow these guides for detailed steps on [starting a new case](../Manage-Cases/#starting-a-new-case) and [loading a mesh file](../mesh-file).


2. Click on the "Load Config File" option. ![](../../su2gui_files/User_guide/Configuration/button-config-file.png)


3. In the pop-up window, choose the desired configuration file. ![](../../su2gui_files/User_guide/Configuration/choose-config-file.png)


4. The configuration file should now be loaded, and the properties in the GUI should be updated accordingly. ![](../../su2gui_files/User_guide/Configuration/loaded-config-file.png)



For instructions on loading a configuration file through the terminal, refer to the guide on [ Terminal Initialization](./../terminal-initialization).

## Config Tab

The Config Tab allows users to analyze and modify the current state of the Configuration File. It presents the data in JSON format, which is then converted into a configuration file for SU2 when the solver is initiated.

![Config Tab](../../su2gui_files/User_guide/Configuration/config-tab.png)

### Adding New Properties

User can add/modify Properties in configuration file using this. Place the Key in key textbox and Value in Value textbox. By default, Key is capitalised and preceding and trailing spaces are removed from the Key. Ways to add Value for property are given below:

- **Adding Float/Int**: The system attempts to convert all input into a float. If the conversion fails, it proceeds with other data types.

- **Adding Boolean**: The system recognizes "YES," "NO," "TRUE," and "FALSE" in any case (uppercase or lowercase) and stores them as boolean values.

- **Adding List**: When a list is added, it creates a list of elements and checks if each element is a digit. Below are examples of correct and incorrect list formats:



| **Correct List** | (outlet1, 101325, outlet2, 101325) | [outlet1, 101325, outlet2, 101325] | outlet1, 101325, outlet2, 101325 | outlet1 101325 outlet2 101325 |
|-------------------|------------------------------------|------------------------------------|---------------------------------|--------------------------------|
| **Incorrect List** | (outlet1, 101325, outlet2, 101325 | outlet1, 101325, outlet2, 101325} | outlet1, 101325 outlet2 101325 | outlet1101325 outlet2101325 |
78 changes: 78 additions & 0 deletions _su2gui/Initialization.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
---
title: Initialization

permalink: /su2gui/Initialization/
---

Initialization is the process of setting up the initial conditions and parameters required to start a simulation. Proper initialization is crucial as it significantly influences the convergence and accuracy of the simulation. By specifying initial values or states, you provide a starting point for the solver, which helps in stabilizing the simulation and achieving reliable results more efficiently.

SU2GUI supports three methods for initializing a problem, which are available under the Initialization section of the menu:

- [**Uniform Initialization**](#uniform-initialization)
- [**Initialization using Restart File**](#initialization-using-restart-file)
- [**Patch Initialization**](#patch-initialization)

### Opening the Initialization Options

1. Start a new case and load the mesh file. Follow these guides for detailed steps on [starting a new case](../Manage-Cases/#starting-a-new-case) and [loading a mesh file](../mesh-file).

2. Navigate to the Initialization section from the left menu:
![](../../su2gui_files/User_guide/initialization/initialize-options.png)

Follow the steps below according to the type of initialization needed.

---

## Uniform Initialization

**Description**: This method involves assigning a single set of initial values (like pressure, velocity, temperature, etc.) uniformly across the entire computational domain.

**Use Case**: Uniform initialization is commonly used when you have little prior knowledge about the flow field or when you want to start with a simple baseline.

**Steps for Uniform Initialization**

1. After opening the Initialization options, select **Uniform Initialization** from the drop-down menu.

2. Enter the required properties. The properties will vary depending on the selected Solver and Configurations.

3. Press the **Initialize** button. The problem will be initialized, and the visualization window will update accordingly.![](../../su2gui_files/User_guide/initialization/loaded-uniform-initialize.png)

---

## Initialization using Restart File

**Description**: This method uses a previously saved simulation state from a Restart file to initialize the current simulation.

**Use Case**: This is ideal for continuing simulations from where they left off or for testing variations without starting from scratch, which can save time and resources.

SU2GUI supports both `.dat` and `.csv` formats for restart files.

**Steps for Restart Initialization**

1. After opening the Initialization options, select **Restart File Initialization** from the drop-down menu.

2. Click on the **Load Restart File** option. ![](../../su2gui_files/User_guide/initialization/button-restart-file.png)

3. In the pop-up window, choose the desired restart file. ![](../../su2gui_files/User_guide/initialization/choose-restart-file.png)

4. The Restart file will be loaded, and the visualization window will update accordingly. ![](../../su2gui_files/User_guide/initialization/loaded-restart-file.png)

For instructions on loading a restart file through the terminal, refer to the guide on [ Terminal Initialization](./../terminal-initialization).

---

## Patch Initialization

**Description**: Patch initialization allows you to define different initial conditions for specific regions (or patches) within the computational domain.

**Use Case**: This method is useful for simulations with complex geometries or varying conditions, enabling more precise control over the initial state of the simulation.

SU2GUI currently supports three types of patch initialization: Plane, Sphere, and Box.

**Steps for Patch Initialization**

1. After opening the Initialization options, select **Patch Initialization** from the drop-down menu.

2. Select type of Patch and enter the required properties for both zones. The properties will change according to the selected Solver and Configurations.

3. Press the **Initialize** button. The problem will be initialized, and the visualization window will update accordingly. ![](../../su2gui_files/User_guide/initialization/loaded-patch-initialize.png)
26 changes: 26 additions & 0 deletions _su2gui/Installation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
title: Installation
permalink: /su2gui/Installation/
---

SU2GUI is designed to be easy to install and offers an intuitive user experience. However, it requires the SU2 software suite to be installed on your system. For instructions on installing SU2, please refer to the [SU2 Installation Guide](../../docs_v7/Installation/).

### Prerequisites

- Python 3.10 or higher
- SU2 installed on your system. Follow the installation instructions [here](../../docs_v7/Installation/).

## Installation

You can install SU2GUI via pip:

pip install su2gui


### Usage
To launch the GUI, run the following command in your terminal:


SU2_GUI

For a quick introduction to using SU2GUI, visit the [Quick start](./../Quick-start) page. For additional terminal options, refer to the [Terminal Initialization](./../Terminal-Initialization) page.
Loading