Skip to content

Commit 9953efb

Browse files
author
Documenter.jl
committed
build based on 203f1e8
1 parent f26191b commit 9953efb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+34576
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"documenter":{"julia_version":"1.11.1","generation_timestamp":"2025-02-27T12:57:46","documenter_version":"1.8.1"}}
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
<!DOCTYPE html>
2+
<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Airfoil · SegregatedVMSSolver.jl</title><meta name="title" content="Airfoil · SegregatedVMSSolver.jl"/><meta property="og:title" content="Airfoil · SegregatedVMSSolver.jl"/><meta property="twitter:title" content="Airfoil · SegregatedVMSSolver.jl"/><meta name="description" content="Documentation for SegregatedVMSSolver.jl."/><meta property="og:description" content="Documentation for SegregatedVMSSolver.jl."/><meta property="twitter:description" content="Documentation for SegregatedVMSSolver.jl."/><script data-outdated-warner src="../../assets/warner.js"></script><link href="https://cdnjs.cloudflare.com/ajax/libs/lato-font/3.0.0/css/lato-font.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/juliamono/0.050/juliamono.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.8/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL="../.."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="../../assets/documenter.js"></script><script src="../../search_index.js"></script><script src="../../siteinfo.js"></script><script src="../../../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../../assets/themes/catppuccin-mocha.css" data-theme-name="catppuccin-mocha"/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../../assets/themes/catppuccin-macchiato.css" data-theme-name="catppuccin-macchiato"/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../../assets/themes/catppuccin-frappe.css" data-theme-name="catppuccin-frappe"/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../../assets/themes/catppuccin-latte.css" data-theme-name="catppuccin-latte"/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../../assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../../assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="../../assets/themeswap.js"></script></head><body><div id="documenter"><nav class="docs-sidebar"><div class="docs-package-name"><span class="docs-autofit"><a href="../../">SegregatedVMSSolver.jl</a></span></div><button class="docs-search-query input is-rounded is-small is-clickable my-2 mx-auto py-1 px-2" id="documenter-search-query">Search docs (Ctrl + /)</button><ul class="docs-menu"><li><a class="tocitem" href="../../">Introduction</a></li><li><span class="tocitem">Parameters Guide</span><ul><li><a class="tocitem" href="../../user_params/">User Parameters</a></li><li><a class="tocitem" href="../../sim_params/">Simulation Parameters</a></li></ul></li><li><a class="tocitem" href="../../mpi/">MPI run</a></li><li><span class="tocitem">Examples</span><ul><li><a class="tocitem" href="../examples/">Intro</a></li><li><a class="tocitem" href="../taylorgreen2D/">Taylor Green 2D</a></li><li><a class="tocitem" href="../taylorgreen3D/">Taylor Green 3D</a></li><li><a class="tocitem" href="../liddriven/">Lid Driven Cavity Flow</a></li><li><a class="tocitem" href="../cylinder/">Cylinder</a></li><li class="is-active"><a class="tocitem" href>Airfoil</a><ul class="internal"><li><a class="tocitem" href="#NACA0012"><span>NACA0012</span></a></li></ul></li><li><a class="tocitem" href="../../create_case/">Create your Own Case</a></li></ul></li><li><span class="tocitem">Theory</span><ul><li><a class="tocitem" href="../../Theory/NS_inc/">Incompressible Navier Stokes</a></li><li><a class="tocitem" href="../../Theory/FEMTheory/">FEM</a></li><li><a class="tocitem" href="../../Theory/SUPG_VMS_stab/">SUPG &amp; VMS Stabilization</a></li><li><a class="tocitem" href="../../Theory/Errors/">Error and Parallelization</a></li></ul></li><li><span class="tocitem">Tools</span><ul><li><a class="tocitem" href="../../Tools/visualization/">Visualization</a></li><li><a class="tocitem" href="../../Tools/post_proc/">Post Processing</a></li><li><a class="tocitem" href="../../Tools/blinit/">Boundary Layer Initialization</a></li></ul></li><li><a class="tocitem" href="../../api_info/">API information</a></li><li><a class="tocitem" href="../../references/">References</a></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><a class="docs-sidebar-button docs-navbar-link fa-solid fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a><nav class="breadcrumb"><ul class="is-hidden-mobile"><li><a class="is-disabled">Examples</a></li><li class="is-active"><a href>Airfoil</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>Airfoil</a></li></ul></nav><div class="docs-right"><a class="docs-navbar-link" href="https://github.com/carlodev/SegregatedVMSSolver.jl" title="View the repository on GitHub"><span class="docs-icon fa-brands"></span><span class="docs-label is-hidden-touch">GitHub</span></a><a class="docs-navbar-link" href="https://github.com/carlodev/SegregatedVMSSolver.jl/blob/master/docs/src/Cases/airfoil.md" title="Edit source on GitHub"><span class="docs-icon fa-solid"></span></a><a class="docs-settings-button docs-navbar-link fa-solid fa-gear" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-article-toggle-button fa-solid fa-chevron-up" id="documenter-article-toggle-button" href="javascript:;" title="Collapse all docstrings"></a></div></header><article class="content" id="documenter-page"><h1 id="Airfoil"><a class="docs-heading-anchor" href="#Airfoil">Airfoil</a><a id="Airfoil-1"></a><a class="docs-heading-anchor-permalink" href="#Airfoil" title="Permalink"></a></h1><p><img src="../../assets/LSB-sd7003.png" alt="LSB-s7003"/></p><p>It is one of the most complex and interesting case. The user has to create a proper mesh in <a href="https://gmsh.info/"><code>gmsh</code></a> setting the following physical boundaries:</p><ul><li><code>inlet</code> for the inlet</li><li><code>outlet</code> for the outlet</li><li><code>airfoil</code> for the airfoil walls</li><li><code>limits</code> for the top and bottom boundaries</li></ul><div class="admonition is-info"><header class="admonition-header">.geo file</header><div class="admonition-body"><p>In the folder <code>models/</code> is possible to find some <code>.msh</code> file created using <a href="https://gmsh.info/"><code>gmsh</code></a> both for 3D and 2D simulations. In the folder <code>models/geo</code> are available some <code>.geo</code> that can be open in <a href="https://gmsh.info/"><code>gmsh</code></a>. Different parameters can be modified: angle of attack, domain dimension, mesh divisions.</p></div></div><p>The velocity at the inlet is increased from <code>0.0</code> arriving to the target value <code>u_in</code> at <code>t_endramp</code>. This increase the numeric stability. If <code>t_endramp</code> = <code>t0</code> the velocity at the inlet will be immediately <code>u_in</code>. For numeric stability is better to keep <code>u_in = [1.0,0.0,0.0]</code>, then fix the Reynolds and so the viscosity will be automatically computed as: <code>ν = 1/Reynolds</code></p><p>The pressure is set <code>0.0</code> at the <code>outlet</code> section. The velocity on the <code>limits</code> is set equal to the one at <code>inlet</code>.</p><p>3D LES are heavy and it is possible to experience divergence issues. It is suggested to use one of the two initialization techniques: <code>Velocity ramping</code> or <code>Boundary layer initialization</code>. For visualize the results, please refer to the section. </p><h2 id="NACA0012"><a class="docs-heading-anchor" href="#NACA0012">NACA0012</a><a id="NACA0012-1"></a><a class="docs-heading-anchor-permalink" href="#NACA0012" title="Permalink"></a></h2><p>A common validation test case is to analyze the NACA0012 airfoil and compare the pressure distribution with experimental results. This is a simple 2D simulation at high Reynolds number <span>$3e6$</span>. For run this case it is suggested to have <code>hypre</code> installed to use a more powerful preconditioner for the resolution. It has been tested on 16 CORES and requires approximately 35 hours.</p><h3 id="Simulation-File"><a class="docs-heading-anchor" href="#Simulation-File">Simulation File</a><a id="Simulation-File-1"></a><a class="docs-heading-anchor-permalink" href="#Simulation-File" title="Permalink"></a></h3><pre><code class="language-julia hljs">using PartitionedArrays
3+
using SegregatedVMSSolver
4+
using SegregatedVMSSolver.ParametersDef
5+
using SegregatedVMSSolver.SolverOptions</code></pre><p>Set the physical parameters of the simulation</p><pre><code class="language-julia hljs">t0 =0.0
6+
dt = 0.00025
7+
tF = 15.0
8+
9+
Re = 3_000_000
10+
D = 2
11+
rank_partition = (16,1,1)
12+
mesh_file = joinpath(@__DIR__, &quot;NACA 0012_2D_A10.msh&quot;)</code></pre><p>Setting the parameters of the simulation</p><pre><code class="language-julia hljs">sprob = StabilizedProblem(VMS(1))
13+
timep = TimeParameters(t0=t0,dt=dt,tF=tF,t_endramp=2.0)
14+
15+
physicalp = PhysicalParameters(Re=Re)
16+
solverp = SolverParameters(M=25,Number_Skip_Expansion=1e6, petsc_options = petsc_options_cstm(), matrix_freq_update=1)
17+
exportp = ExportParameters(printinitial=true,printmodel=true,name_tags=[&quot;airfoil&quot;], fieldexport=[[&quot;ph&quot;,&quot;friction&quot;]])
18+
19+
20+
meshp= MeshParameters(rank_partition,D,mesh_file)
21+
22+
simparams = SimulationParameters(timep,physicalp,solverp,exportp)
23+
24+
AirfoilCase = Airfoil(meshp,simparams,sprob)
25+
</code></pre><p>Solve in Sequential - on 1 processor not using MPI, useful for debug.</p><pre><code class="language-julia hljs"> SegregatedVMSSolver.solve(AirfoilCase,with_debug)</code></pre><p>Solve in MPI - for HPC computing</p><pre><code class="language-julia hljs"> SegregatedVMSSolver.solve(AirfoilCase,with_mpi)</code></pre><p>Then in bash give the command. Check the MPI section for more details</p><pre><code class="language-bash hljs"> mpiexecjl -n 4 julia --project=. run_mysimulation.jl</code></pre><h3 id="Results"><a class="docs-heading-anchor" href="#Results">Results</a><a id="Results-1"></a><a class="docs-heading-anchor-permalink" href="#Results" title="Permalink"></a></h3><p>The results can be post-processed using the following script. The first <code>10000</code> time-steps are skipped to avoid the initial transient.</p><pre><code class="language-julia hljs">
26+
using Pkg
27+
Pkg.activate(&quot;../.&quot;)
28+
using SegregatedVMSSolver
29+
using SegregatedVMSSolver.ReadAirfoilResults
30+
using Plots, LaTeXStrings, KissSmoothing
31+
using CSV, DataFrames
32+
using JLD2
33+
34+
Case = &quot;NACA0012&quot;
35+
α = 10.0
36+
37+
38+
res_path = joinpath(@__DIR__, &quot;$(Case)_A$(Int64(α))&quot;, &quot;Results/&quot;)
39+
40+
41+
Re = 3_000_000
42+
43+
der_slope= -1.0
44+
45+
46+
u0 = 1.0
47+
c = 1.0
48+
rho = 1.0
49+
μ = u0*c*rho/Re
50+
51+
52+
53+
nodes, normals = get_geometry_info(res_path;α=α, der_slope= der_slope)
54+
55+
Ph = time_space_average_field(res_path, &quot;ph&quot;, nodes; offset=10_000)
56+
57+
cp_top, cp_bottom = extract_Cp(nodes, Ph; u0=u0, rho=rho)
58+
59+
60+
plot(nodes.top.x ./ cosd(α), cp_top, label = &quot;2D - VMS&quot;, color = :red, linewidth = 1.5)
61+
plot!(nodes.bottom.x./ cosd(α), cp_bottom, label = false, color = :red, linewidth = 1.5)
62+
yflip!()
63+
plot!(xlabel=&quot;x/c&quot;, ylabel=&quot;Cp&quot;, legend=:top)</code></pre><p>The pressure distribution results are compared with the experiments reported in [<a href="../../references/#Ladson">4</a>] <img src="../../assets/NACA0012_A10_Cp.png" alt="NACA0012_CP"/></p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../cylinder/">« Cylinder</a><a class="docs-footer-nextpage" href="../../create_case/">Create your Own Case »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.8.1 on <span class="colophon-date" title="Thursday 27 February 2025 12:57">Thursday 27 February 2025</span>. Using Julia version 1.11.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>

0 commit comments

Comments
 (0)