Skip to content

Commit 1d7a92d

Browse files
committed
Add Base Documentation for SU2GUI
1 parent da83c75 commit 1d7a92d

39 files changed

+581
-4
lines changed

Gemfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
source 'https://rubygems.org'
22
group :jekyll_plugins do
3+
gem 'tzinfo'
34
gem 'github-pages'
45
gem 'jekyll-twitter-plugin'
56
gem 'webrick'
7+
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
68
end

_config.yml

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,12 @@ bootwatch: yeti
1616
# Build settings
1717
markdown: kramdown
1818
highlighter: rouge
19-
gems:
19+
plugins:
2020
- jekyll-feed
2121
- jekyll-redirect-from
2222
- jekyll-seo-tag
2323
- jekyll-sitemap
24+
- jekyll-gist
2425

2526
whitelist:
2627
- jekyll-redirect-from
@@ -32,7 +33,9 @@ exclude:
3233
- .idea/
3334
- .gitignore
3435
- README.md
35-
timezone: Europe/Berlin
36+
37+
timezone: "America/New_York"
38+
3639
defaults:
3740
- scope:
3841
path: _posts
@@ -76,6 +79,16 @@ defaults:
7679
sectionid: vandv
7780
seo:
7881
type: "WebPage"
82+
83+
- scope:
84+
path: _su2gui
85+
type: su2gui
86+
values:
87+
layout: su2gui
88+
sectionid: su2gui
89+
seo:
90+
type: "WebPage"
91+
7992
collections:
8093
docs:
8194
permalink: /:collection/:path/
@@ -89,12 +102,13 @@ collections:
89102
vandv:
90103
permalink: /:collection/:path/
91104
output: true
105+
su2gui:
106+
permalink: /:collection/:path/
107+
output: true
92108
posts:
93109
permalink: /blog/:year/:month/:day/:title/
94110
output: true
95111

96112
# Google Analytics
97113
google_analytics: UA-28187985-1
98114

99-
plugins:
100-
- jekyll-gist

_data/su2gui.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
- title: Introduction to SU2GUI
2+
su2gui:
3+
- Introduction
4+
- Quick-Start
5+
6+
- title: Installation
7+
su2gui:
8+
- Installation
9+
- Build-From-Source
10+
11+
- title: User Guide
12+
su2gui:
13+
- Terminal-Initialization
14+
- Manage-Cases
15+
- Mesh-File
16+
- configurations
17+
- Initialization
18+
- Logs-Errors
19+
- Result-Analysis

_includes/su2gui_nav.html

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true">
2+
{% for section in site.data.su2gui %}
3+
<div class="panel panel-default">
4+
<div class="panel-heading">
5+
<h4 class="panel-title">
6+
<a role="button" data-toggle="collapse" data-parent="#accordion" href="#collapse-{{forloop.index}}" aria-expanded="false" aria-controls="collapse-{{forloop.index}}">
7+
{{ section.title }}
8+
</a>
9+
</h4>
10+
</div>
11+
<div id="collapse-{{forloop.index}}" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingOne">
12+
<ul class="list-group">
13+
{% for item in section.su2gui %}
14+
{% assign item_url = item | prepend:"/su2gui/" | append:"/" %}
15+
{% assign p = site.su2gui | where:"url", item_url | first %}
16+
<a class="list-group-item {% if item_url == page.url %}active{% endif %}" href="{{ p.url | relative_url }}">{{ p.title }}</a>
17+
{% endfor %}
18+
</ul>
19+
</div>
20+
</div>
21+
{% endfor %}
22+
</div>

_includes/su2gui_section_nav.html

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
{% comment %}
2+
Map grabs the doc sections, giving us an array of arrays. Join, flattens all
3+
the items to a comma delimited string. Split turns it into an array again.
4+
{% endcomment %}
5+
{% assign su2gui = site.data.su2gui | map: 'su2gui' | join: ',' | split: ',' %}
6+
7+
{% comment %}
8+
Because this is built for every page, lets find where we are in the ordered
9+
document list by comparing url strings. Then if there's something previous or
10+
next, lets build a link to it.
11+
{% endcomment %}
12+
13+
{% for document in su2gui %}
14+
{% assign document_url = document | prepend:"/su2gui/" | append:"/" %}
15+
{% if document_url == page.url %}
16+
<ul class="pager">
17+
{% if forloop.first %}
18+
<li class="previous disabled">
19+
<a>
20+
<span aria-hidden="true">&larr;</span> Previous
21+
</a>
22+
</li>
23+
{% else %}
24+
{% assign previous = forloop.index0 | minus: 1 %}
25+
{% assign previous_page = su2gui[previous] | prepend:"/su2gui/" | append:"/" %}
26+
<li class="previous">
27+
<a href="{{ previous_page | relative_url }}">
28+
<span aria-hidden="true">&larr;</span> Previous
29+
</a>
30+
</li>
31+
{% endif %}
32+
33+
{% if forloop.last %}
34+
<li class="next disabled">
35+
<a>
36+
Next <span aria-hidden="true">&rarr;</span>
37+
</a>
38+
</li>
39+
{% else %}
40+
{% assign next = forloop.index0 | plus: 1 %}
41+
{% assign next_page = su2gui[next] | prepend:"/su2gui/" | append:"/" %}
42+
<li class="next">
43+
<a href="{{ next_page | relative_url }}">
44+
Next <span aria-hidden="true">&rarr;</span>
45+
</a>
46+
</li>
47+
{% endif %}
48+
</div>
49+
<div class="clear"></div>
50+
{% break %}
51+
{% endif %}
52+
{% endfor %}

_includes/topnav.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
<li {% if page.sectionid=='forum' %} class="active" {% endif %}><a href="{{ "https://www.cfd-online.com/Forums/su2/" }}">User Forum</a></li>
2222
<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>
2323
<li {% if page.sectionid=='develop' %} class="active" {% endif %}><a href="{{ "/develop.html" relative_url }}">Develop</a></li>
24+
<li {% if page.sectionid=='su2gui' %} class="active" {% endif %}><a href="{{ "/su2gui/introduction" relative_url }}">SU2GUI</a></li>
2425
</ul>
2526
<div class="navbar-right">
2627
<ul class="nav navbar-nav">

_layouts/su2gui.html

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
---
2+
layout: default
3+
---
4+
5+
<div class="container">
6+
<div class="row">
7+
<div class="col-md-4">
8+
{% include su2gui_nav.html %}
9+
</div>
10+
11+
<div class="col-md-8">
12+
<h1>{{ page.title }}</h1>
13+
<div id="markdown-content-container">{{ content }}</div>
14+
<hr>
15+
{% unless true %}
16+
<script>
17+
18+
/**
19+
* RECOMMENDED CONFIGURATION VARIABLES: EDIT AND UNCOMMENT THE SECTION BELOW TO INSERT DYNAMIC VALUES FROM YOUR PLATFORM OR CMS.
20+
* LEARN WHY DEFINING THESE VARIABLES IS IMPORTANT: https://disqus.com/admin/universalcode/#configuration-variables*/
21+
/*
22+
var disqus_config = function () {
23+
this.page.url = PAGE_URL; // Replace PAGE_URL with your page's canonical URL variable
24+
this.page.identifier = PAGE_IDENTIFIER; // Replace PAGE_IDENTIFIER with your page's unique identifier variable
25+
};
26+
*/
27+
(function() { // DON'T EDIT BELOW THIS LINE
28+
var d = document, s = d.createElement('script');
29+
s.src = 'https://su2code-github-io.disqus.com/embed.js';
30+
s.setAttribute('data-timestamp', +new Date());
31+
(d.head || d.body).appendChild(s);
32+
})();
33+
</script>
34+
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
35+
36+
37+
<div id="disqus_thread"></div>
38+
<hr>
39+
{% endunless %}
40+
<p class="text-center">
41+
<br />
42+
<a target="_blank" href="{{site.git_edit_address}}/{{ page.path }}" class="btn btn-default githubEditButton" role="button">
43+
<i class="fa fa-pencil fa-lg"></i> Improve this page
44+
</a>
45+
</p>
46+
{% include su2gui_section_nav.html %}
47+
</div>
48+
49+
</div>
50+
</div>
51+
52+
<!-- Mathjax Support -->
53+
<script type="text/javascript" async
54+
src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
55+
</script>

_su2gui/Build-From-Source.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
title: Build From Source and Contributions
3+
permalink: /su2gui/Build-From-Source/
4+
---
5+
6+
This section guides you through using the source code to run SU2GUI on your device, enabling custom changes and optimizations.
7+
8+
### Minimal Requirements
9+
10+
- Python 3
11+
- SU2 Software
12+
- Python Libraries listed in [requirements.txt](Link)
13+
14+
### Installation and Setup
15+
16+
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.
17+
18+
### Command to Start the Server
19+
20+
usage: python su2gui.py [-h] [-p PORT] [-c CASE] [-m MESH] [--config CONFIG] [--restart RESTART]
21+
22+
## Contributing to SU2
23+
24+
As an open-source organization, we actively develop SU2 software suite and greatly appreciate contributions from the community. Whether it's fixing bugs, adding new features, or improving documentation, your contributions are valuable. To get started, refer to our [Contribution Guide](./../../docs_v7/Gitting-Started/) for detailed instructions on how to contribute to SU2.

_su2gui/Configurations.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
---
2+
title: Configurations
3+
permalink: /su2gui/configurations/
4+
---
5+
6+
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.
7+
8+
## Loading a Configuration File
9+
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.
10+
11+
**Steps to load configuration file:**
12+
13+
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).
14+
15+
16+
2. Click on the "Load Config File" option. ![](../../su2gui_files/User_guide/Configuration/button-config-file.png)
17+
18+
19+
3. In the pop-up window, choose the desired configuration file. ![](../../su2gui_files/User_guide/Configuration/choose-config-file.png)
20+
21+
22+
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)
23+
24+
25+
26+
For instructions on loading a configuration file through the terminal, refer to the guide on [ Terminal Initialization](./../terminal-initialization).
27+
28+
## Config Tab
29+
30+
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.
31+
32+
![Config Tab](../../su2gui_files/User_guide/Configuration/config-tab.png)
33+
34+
### Adding New Properties
35+
36+
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:
37+
38+
- **Adding Float/Int**: The system attempts to convert all input into a float. If the conversion fails, it proceeds with other data types.
39+
40+
- **Adding Boolean**: The system recognizes "YES," "NO," "TRUE," and "FALSE" in any case (uppercase or lowercase) and stores them as boolean values.
41+
42+
- **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:
43+
44+
45+
46+
| **Correct List** | (outlet1, 101325, outlet2, 101325) | [outlet1, 101325, outlet2, 101325] | outlet1, 101325, outlet2, 101325 | outlet1 101325 outlet2 101325 |
47+
|-------------------|------------------------------------|------------------------------------|---------------------------------|--------------------------------|
48+
| **Incorrect List** | (outlet1, 101325, outlet2, 101325 | outlet1, 101325, outlet2, 101325} | outlet1, 101325 outlet2 101325 | outlet1101325 outlet2101325 |

_su2gui/Initialization.md

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
---
2+
title: Initialization
3+
4+
permalink: /su2gui/Initialization/
5+
---
6+
7+
SU2GUI supports three methods for initializing a problem, which are available under the Initialization section of the menu:
8+
9+
- [**Uniform Initialization**](#uniform-initialization)
10+
- [**Initialization using Restart File**](#initialization-using-restart-file)
11+
- [**Patch Initialization**](#patch-initialization)
12+
13+
### Opening the Initialization Options
14+
15+
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).
16+
17+
2. Navigate to the Initialization section from the left menu:
18+
![](../../su2gui_files/User_guide/initialization/initialize-options.png)
19+
20+
Follow the steps below according to the type of initialization needed.
21+
22+
---
23+
24+
## Uniform Initialization
25+
26+
As the name suggests, this method sets all points to a constant value, and a solution file is created for SU2.
27+
28+
**Steps for Uniform Initialization**
29+
30+
1. After opening the Initialization options, select **Uniform Initialization** from the drop-down menu.
31+
32+
2. Enter the required properties. The properties will vary depending on the selected Solver and Configurations.
33+
34+
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)
35+
36+
---
37+
38+
## Initialization using Restart File
39+
40+
This method uses a Restart File to initialize the problem. SU2GUI supports both `.dat` and `.csv` formats for restart files.
41+
42+
**Steps for Restart Initialization**
43+
44+
1. After opening the Initialization options, select **Restart File Initialization** from the drop-down menu.
45+
46+
2. Click on the **Load Restart File** option. ![](../../su2gui_files/User_guide/initialization/button-restart-file.png)
47+
48+
3. In the pop-up window, choose the desired restart file. ![](../../su2gui_files/User_guide/initialization/choose-restart-file.png)
49+
50+
4. The Restart file will be loaded, and the visualization window will update accordingly. ![](../../su2gui_files/User_guide/initialization/loaded-restart-file.png)
51+
52+
For instructions on loading a restart file through the terminal, refer to the guide on [ Terminal Initialization](./../terminal-initialization).
53+
54+
---
55+
56+
## Patch Initialization
57+
58+
SU2GUI currently supports three types of patch initialization: Plane, Sphere, and Box. In this method, a patch is created in the visualization window according to the inputs, and a solution file is generated for SU2.
59+
60+
**Steps for Patch Initialization**
61+
62+
1. After opening the Initialization options, select **Patch Initialization** from the drop-down menu.
63+
64+
2. Select type of Patch and enter the required properties for both zones. The properties will change according to the selected Solver and Configurations.
65+
66+
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)

0 commit comments

Comments
 (0)