From 272b3c8209a4fdd3810861883f26beaa41965335 Mon Sep 17 00:00:00 2001 From: Su Tian Date: Mon, 18 Nov 2024 22:09:51 +0800 Subject: [PATCH 1/2] minor fix --- src/execu.cpp | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/src/execu.cpp b/src/execu.cpp index bccbc14..af3d693 100644 --- a/src/execu.cpp +++ b/src/execu.cpp @@ -20,6 +20,8 @@ #ifdef _WIN32 #include +#else +#include #endif using namespace std; @@ -54,13 +56,13 @@ std::string formatPaths(const char *paths) { void setPath(Message *pmessage) { // Get the PATH environment variable char* path = nullptr; + +#ifdef _WIN32 size_t path_len; if (_dupenv_s(&path, &path_len, "PATH") == 0 && path != nullptr) { PLOG(debug) << pmessage->message(formatPaths(path)); - } - - else { + } else { PLOG(error) << pmessage->message("Failed to get PATH environment variable."); } @@ -68,6 +70,19 @@ void setPath(Message *pmessage) { // containing the executable _putenv_s("PATH", path); +// #else +// path = getenv("PATH"); +// if (path != nullptr) { +// PLOG(debug) << pmessage->message(formatPaths(path)); +// } else { +// PLOG(error) << pmessage->message("Failed to get PATH environment variable."); +// } + +// // Ensure the PATH environment variable includes the directory containing the executable +// setenv("PATH", path, 1); + +#endif + return; } From 7c524dfcd256020687c516421683649ce5f5ff58 Mon Sep 17 00:00:00 2001 From: Su Tian Date: Fri, 22 Nov 2024 11:05:49 +0800 Subject: [PATCH 2/2] update doc --- doc/user/source/conf.py | 20 +- doc/user/source/contents/examples.rst | 16 -- .../contents/examples/example_airfoil.rst | 234 +++++++++--------- .../examples/example_airfoil_recover.rst | 32 +-- doc/user/source/contents/examples/index.rst | 16 ++ .../contents/{guide.rst => guide/index.rst} | 54 ++-- doc/user/source/contents/guide/pre_shape.rst | 85 ++++--- doc/user/source/contents/ref/bib.rst | 11 + .../source/contents/{ => ref}/changelog.rst | 0 doc/user/source/contents/ref/index.rst | 11 + doc/user/source/contents/{ => ref}/xml.rst | 0 doc/user/source/contents/references.rst | 11 - doc/user/source/contents/start/index.rst | 10 + .../source/contents/{ => start}/install.rst | 0 doc/user/source/contents/{ => start}/run.rst | 0 doc/user/source/index.rst | 63 ++++- 16 files changed, 314 insertions(+), 249 deletions(-) delete mode 100644 doc/user/source/contents/examples.rst create mode 100644 doc/user/source/contents/examples/index.rst rename doc/user/source/contents/{guide.rst => guide/index.rst} (81%) create mode 100644 doc/user/source/contents/ref/bib.rst rename doc/user/source/contents/{ => ref}/changelog.rst (100%) create mode 100644 doc/user/source/contents/ref/index.rst rename doc/user/source/contents/{ => ref}/xml.rst (100%) delete mode 100644 doc/user/source/contents/references.rst create mode 100644 doc/user/source/contents/start/index.rst rename doc/user/source/contents/{ => start}/install.rst (100%) rename doc/user/source/contents/{ => start}/run.rst (100%) diff --git a/doc/user/source/conf.py b/doc/user/source/conf.py index 0d885ce..30669e5 100644 --- a/doc/user/source/conf.py +++ b/doc/user/source/conf.py @@ -110,13 +110,19 @@ # further. For a list of options available for each theme, see the # documentation. # -# html_theme_options = { -# "repository_url": "https://github.itap.purdue.edu/wenbinyugroup/prevabs", -# "use_repository_button": True, -# "use_issues_button": True, -# "use_edit_page_button": True, -# "use_download_button": True, -# } +html_theme_options = { + 'logo': { + 'text': 'PreVABS', + }, + 'show_nav_level': 2, + # "path_to_docs": "doc/source", + # 'use_edit_page_button': True, + # "use_repository_button": True, + # "use_issues_button": True, + # 'collapse_navigation': True, + 'navigation_depth': 4, + "announcement": "Documentation is under construction.", +} html_show_copyright = False diff --git a/doc/user/source/contents/examples.rst b/doc/user/source/contents/examples.rst deleted file mode 100644 index 74142fe..0000000 --- a/doc/user/source/contents/examples.rst +++ /dev/null @@ -1,16 +0,0 @@ -Examples -======== - -.. toctree:: - :maxdepth: 1 - :caption: Table of Contents - - examples/example_box - examples/example_pipe - examples/example_tube - examples/example_channel - examples/example_airfoil - examples/example_airfoil_recover - examples/example_uh60a_fi - -.. example_ibeam diff --git a/doc/user/source/contents/examples/example_airfoil.rst b/doc/user/source/contents/examples/example_airfoil.rst index a444580..5622992 100644 --- a/doc/user/source/contents/examples/example_airfoil.rst +++ b/doc/user/source/contents/examples/example_airfoil.rst @@ -6,12 +6,12 @@ Airfoil (MH-104) Problem description ------------------- -.. figure:: /figures/examplemh1040.png - :name: fig_mh104_draw - :width: 5.5in - :align: center +.. figure:: /figures/examplemh1040.png + :name: fig_mh104_draw + :width: 5.5in + :align: center - Sketch of a cross section for a typical wind turbine blade [CHEN2010]_. + Sketch of a cross section for a typical wind turbine blade [CHEN2010]_. This example demonstrates the capability of building a cross section having an airfoil shape, which is commonly seen on wind turbine blades or helicopter rotor blades. This example is also studied in [CHEN2010]_. @@ -27,86 +27,86 @@ Materials are given in :numref:`Table %s ` and layups are A complete :math:`6\times 6` stiffness matrix is given in :numref:`Table %s `. Complete input files can be found in ``examples\ex_airfoil\``, including ``mh104.xml``, ``basepoints.dat``, ``baselines.xml``, ``materials.xml``, and ``layups.xml``. -.. csv-table:: Dividing points - :name: table_div_pts - :header-rows: 2 - :align: center - - "Between segments", "Low pressure surface", "High pressure surface" - , ":math:`(x, y)`", ":math:`(x, y)`" - "1 and 2", "(0.004053940, 0.011734800)", "(0.006824530, -0.009881650)" - "2 and 3", "(0.114739930, 0.074571970)", "(0.126956710, -0.047620490)" - "3 and 4", "(0.536615950, 0.070226120)", "(0.542952100, -0.044437080)" - -.. figure:: /figures/examplemh1041.png - :name: fig_mh1041 - :width: 6.5in - :align: center - - *Base point*\ s of the tube cross section. - -.. figure:: /figures/examplemh1042.png - :name: fig_mh1042 - :width: 6.5in - :align: center - - *Base line*\ s of the tube cross section. - -.. figure:: /figures/examplemh1043.png - :name: fig_mh1043 - :width: 6.5in - :align: center - - *Segment*\ s of the tube cross section. - -.. figure:: /figures/examplemh1044.png - :name: fig_mh104 - :width: 6.5in - :align: center - - Meshed cross section viewed in Gmsh. - -.. csv-table:: Material properties - :name: table_mh104_materials - :header-rows: 2 - :align: center - - "Name", "Type", "Density", |e1|, |e2|, |e3|, |g12|, |g13|, |g23|, |nu12|, |nu13|, |nu23| - , , |den_si_k|, |mod_si_g|, |mod_si_g|, |mod_si_g|, |mod_si_g|, |mod_si_g|, |mod_si_g|, , , - "Uni-directional FRP", "orthotropic", 1.86, 37.00, 9.00, 9.00, 4.00, 4.00, 4.00, 0.28, 0.28, 0.28 - "Double-bias FRP", "orthotropic", 1.83, 10.30, 10.30, 10.30, 8.00, 8.00, 8.00, 0.30, 0.30, 0.30 - "Gelcoat", "orthotropic", 1.83, 1e-8, 1e-8, 1e-8, 1e-9, 1e-9, 1e-9, 0.30, 0.30, 0.30 - "Nexus", "orthotropic", 1.664, 10.30, 10.30, 10.30, 8.00, 8.00, 8.00, 0.30, 0.30, 0.30 - "Balsa", "orthotropic", 0.128, 0.01, 0.01, 0.01, 2e-4, 2e-4, 2e-4, 0.30, 0.30, 0.30 - -.. csv-table:: Layups - :name: table_mh104_layups - :header-rows: 2 - :align: center - - "Name", "Layer", "Material", "Ply thickness", "Orientation", "Number of plies" - , , , |len_si|, :math:`\circ`, - "layup_1", 1, "Gelcoat", 0.000381, 0, 1 - , 2, "Nexus", 0.00051, 0, 1 - , 3, "Double-bias FRP", 0.00053, 20, 18 - "layup_2", 1, "Gelcoat", 0.000381, 0, 1 - , 2, "Nexus", 0.00051, 0, 1 - , 3, "Double-bias FRP", 0.00053, 20, 33 - "layup_3", 1, "Gelcoat", 0.000381, 0, 1 - , 2, "Nexus", 0.00051, 0, 1 - , 3, "Double-bias FRP", 0.00053, 20, 17 - , 4, "Uni-directional FRP", 0.00053, 30, 38 - , 5, "Balsa", 0.003125, 0, 1 - , 6, "Uni-directional FRP", 0.00053, 30, 37 - , 7, "Double-bias FRP", 0.00053, 20, 16 - "layup_4", 1, "Gelcoat", 0.000381, 0, 1 - , 2, "Nexus", 0.00051, 0, 1 - , 3, "Double-bias FRP", 0.00053, 20, 17 - , 4, "Balsa", 0.003125, 0, 1 - , 5, "Double-bias FRP", 0.00053, 0, 16 - "layup_web", 1, "Uni-directional FRP", 0.00053, 0, 38 - , 2, "Balsa", 0.003125, 0, 1 - , 3, "Uni-directional FRP", 0.00053, 0, 38 +.. csv-table:: Dividing points + :name: table_div_pts + :header-rows: 2 + :align: center + + "Between segments", "Low pressure surface", "High pressure surface" + , ":math:`(x, y)`", ":math:`(x, y)`" + "1 and 2", "(0.004053940, 0.011734800)", "(0.006824530, -0.009881650)" + "2 and 3", "(0.114739930, 0.074571970)", "(0.126956710, -0.047620490)" + "3 and 4", "(0.536615950, 0.070226120)", "(0.542952100, -0.044437080)" + +.. figure:: /figures/examplemh1041.png + :name: fig_mh1041 + :width: 6.5in + :align: center + + *Base point*\ s of the tube cross section. + +.. figure:: /figures/examplemh1042.png + :name: fig_mh1042 + :width: 6.5in + :align: center + + *Base line*\ s of the tube cross section. + +.. figure:: /figures/examplemh1043.png + :name: fig_mh1043 + :width: 6.5in + :align: center + + *Segment*\ s of the tube cross section. + +.. figure:: /figures/examplemh1044.png + :name: fig_mh104 + :width: 6.5in + :align: center + + Meshed cross section viewed in Gmsh. + +.. csv-table:: Material properties + :name: table_mh104_materials + :header-rows: 2 + :align: center + + "Name", "Type", "Density", |e1|, |e2|, |e3|, |g12|, |g13|, |g23|, |nu12|, |nu13|, |nu23| + , , |den_si_k|, |mod_si_g|, |mod_si_g|, |mod_si_g|, |mod_si_g|, |mod_si_g|, |mod_si_g|, , , + "Uni-directional FRP", "orthotropic", 1.86, 37.00, 9.00, 9.00, 4.00, 4.00, 4.00, 0.28, 0.28, 0.28 + "Double-bias FRP", "orthotropic", 1.83, 10.30, 10.30, 10.30, 8.00, 8.00, 8.00, 0.30, 0.30, 0.30 + "Gelcoat", "orthotropic", 1.83, 1e-8, 1e-8, 1e-8, 1e-9, 1e-9, 1e-9, 0.30, 0.30, 0.30 + "Nexus", "orthotropic", 1.664, 10.30, 10.30, 10.30, 8.00, 8.00, 8.00, 0.30, 0.30, 0.30 + "Balsa", "orthotropic", 0.128, 0.01, 0.01, 0.01, 2e-4, 2e-4, 2e-4, 0.30, 0.30, 0.30 + +.. csv-table:: Layups + :name: table_mh104_layups + :header-rows: 2 + :align: center + + "Name", "Layer", "Material", "Ply thickness", "Orientation", "Number of plies" + , , , |len_si|, :math:`\circ`, + "layup_1", 1, "Gelcoat", 0.000381, 0, 1 + , 2, "Nexus", 0.00051, 0, 1 + , 3, "Double-bias FRP", 0.00053, 20, 18 + "layup_2", 1, "Gelcoat", 0.000381, 0, 1 + , 2, "Nexus", 0.00051, 0, 1 + , 3, "Double-bias FRP", 0.00053, 20, 33 + "layup_3", 1, "Gelcoat", 0.000381, 0, 1 + , 2, "Nexus", 0.00051, 0, 1 + , 3, "Double-bias FRP", 0.00053, 20, 17 + , 4, "Uni-directional FRP", 0.00053, 30, 38 + , 5, "Balsa", 0.003125, 0, 1 + , 6, "Uni-directional FRP", 0.00053, 30, 37 + , 7, "Double-bias FRP", 0.00053, 20, 16 + "layup_4", 1, "Gelcoat", 0.000381, 0, 1 + , 2, "Nexus", 0.00051, 0, 1 + , 3, "Double-bias FRP", 0.00053, 20, 17 + , 4, "Balsa", 0.003125, 0, 1 + , 5, "Double-bias FRP", 0.00053, 0, 16 + "layup_web", 1, "Uni-directional FRP", 0.00053, 0, 38 + , 2, "Balsa", 0.003125, 0, 1 + , 3, "Uni-directional FRP", 0.00053, 0, 38 @@ -115,36 +115,36 @@ Complete input files can be found in ``examples\ex_airfoil\``, including ``mh104 Result ------ -.. table:: Effective Timoshenko stiffness matrix - :name: table_airfoil_result - - =================================== =================================== =================================== =================================== =================================== =================================== - :math:`\phantom{-}2.395\times 10^9` :math:`\phantom{-}1.588\times 10^6` :math:`\phantom{-}7.215\times 10^6` :math:`-3.358\times 10^7` :math:`\phantom{-}6.993\times 10^7` :math:`-5.556\times 10^8` - :math:`\phantom{-}1.588\times 10^6` :math:`\phantom{-}4.307\times 10^8` :math:`-3.609\times 10^6` :math:`-1.777\times 10^7` :math:`\phantom{-}1.507\times 10^7` :math:`\phantom{-}2.652\times 10^5` - :math:`\phantom{-}7.215\times 10^6` :math:`-3.609\times 10^6` :math:`\phantom{-}2.828\times 10^7` :math:`\phantom{-}8.440\times 10^5` :math:`\phantom{-}2.983\times 10^5` :math:`-5.260\times 10^6` - :math:`-3.358\times 10^7` :math:`-1.777\times 10^7` :math:`\phantom{-}8.440\times 10^5` :math:`\phantom{-}2.236\times 10^7` :math:`-2.024\times 10^6` :math:`\phantom{-}2.202\times 10^6` - :math:`\phantom{-}6.993\times 10^7` :math:`\phantom{-}1.507\times 10^7` :math:`\phantom{-}2.983\times 10^5` :math:`-2.024\times 10^6` :math:`\phantom{-}2.144\times 10^7` :math:`-9.137\times 10^6` - :math:`-5.556\times 10^8` :math:`\phantom{-}2.652\times 10^5` :math:`-5.260\times 10^6` :math:`\phantom{-}2.202\times 10^6` :math:`-9.137\times 10^6` :math:`\phantom{-}4.823\times 10^8` - =================================== =================================== =================================== =================================== =================================== =================================== - -.. table:: Results from reference [CHEN2010]_ - :name: table_airfoil_result_ref - - =================================== =================================== =================================== =================================== =================================== =================================== - :math:`\phantom{-}2.389\times 10^9` :math:`\phantom{-}1.524\times 10^6` :math:`\phantom{-}6.734\times 10^6` :math:`-3.382\times 10^7` :math:`-2.627\times 10^7` :math:`-4.736\times 10^8` - :math:`\phantom{-}1.524\times 10^6` :math:`\phantom{-}4.334\times 10^8` :math:`-3.741\times 10^6` :math:`-2.935\times 10^5` :math:`\phantom{-}1.527\times 10^7` :math:`\phantom{-}3.835\times 10^5` - :math:`\phantom{-}6.734\times 10^6` :math:`-3.741\times 10^6` :math:`\phantom{-}2.743\times 10^7` :math:`-4.592\times 10^4` :math:`-6.869\times 10^2` :math:`-4.742\times 10^6` - :math:`-3.382\times 10^7` :math:`-2.935\times 10^5` :math:`-4.592\times 10^4` :math:`\phantom{-}2.167\times 10^7` :math:`-6.279\times 10^4` :math:`\phantom{-}1.430\times 10^6` - :math:`-2.627\times 10^7` :math:`\phantom{-}1.527\times 10^7` :math:`-6.869\times 10^2` :math:`-6.279\times 10^4` :math:`\phantom{-}1.970\times 10^7` :math:`\phantom{-}1.209\times 10^7` - :math:`-4.736\times 10^8` :math:`\phantom{-}3.835\times 10^5` :math:`-4.742\times 10^6` :math:`\phantom{-}1.430\times 10^6` :math:`\phantom{-}1.209\times 10^7` :math:`\phantom{-}4.406\times 10^8` - =================================== =================================== =================================== =================================== =================================== =================================== - -.. note:: The errors between the result and the reference are caused by the difference of modeling of the trailing edge. If reduce the trailing edge skin to a single thin layer, then the difference between the trailing edge shapes is minimized, and the two resulting stiffness matrices are basically the same, as shown in :numref:`Fig. %s `. - -.. figure:: /figures/examplemh104_comparison.png - :name: fig_mh104_comparison - :width: 6in - :align: center - - Comparison of stiffness matrices after modifying the trailing edge. +.. table:: Effective Timoshenko stiffness matrix + :name: table_airfoil_result + + =================================== =================================== =================================== =================================== =================================== =================================== + :math:`\phantom{-}2.395\times 10^9` :math:`\phantom{-}1.588\times 10^6` :math:`\phantom{-}7.215\times 10^6` :math:`-3.358\times 10^7` :math:`\phantom{-}6.993\times 10^7` :math:`-5.556\times 10^8` + :math:`\phantom{-}1.588\times 10^6` :math:`\phantom{-}4.307\times 10^8` :math:`-3.609\times 10^6` :math:`-1.777\times 10^7` :math:`\phantom{-}1.507\times 10^7` :math:`\phantom{-}2.652\times 10^5` + :math:`\phantom{-}7.215\times 10^6` :math:`-3.609\times 10^6` :math:`\phantom{-}2.828\times 10^7` :math:`\phantom{-}8.440\times 10^5` :math:`\phantom{-}2.983\times 10^5` :math:`-5.260\times 10^6` + :math:`-3.358\times 10^7` :math:`-1.777\times 10^7` :math:`\phantom{-}8.440\times 10^5` :math:`\phantom{-}2.236\times 10^7` :math:`-2.024\times 10^6` :math:`\phantom{-}2.202\times 10^6` + :math:`\phantom{-}6.993\times 10^7` :math:`\phantom{-}1.507\times 10^7` :math:`\phantom{-}2.983\times 10^5` :math:`-2.024\times 10^6` :math:`\phantom{-}2.144\times 10^7` :math:`-9.137\times 10^6` + :math:`-5.556\times 10^8` :math:`\phantom{-}2.652\times 10^5` :math:`-5.260\times 10^6` :math:`\phantom{-}2.202\times 10^6` :math:`-9.137\times 10^6` :math:`\phantom{-}4.823\times 10^8` + =================================== =================================== =================================== =================================== =================================== =================================== + +.. table:: Results from reference [CHEN2010]_ + :name: table_airfoil_result_ref + + =================================== =================================== =================================== =================================== =================================== =================================== + :math:`\phantom{-}2.389\times 10^9` :math:`\phantom{-}1.524\times 10^6` :math:`\phantom{-}6.734\times 10^6` :math:`-3.382\times 10^7` :math:`-2.627\times 10^7` :math:`-4.736\times 10^8` + :math:`\phantom{-}1.524\times 10^6` :math:`\phantom{-}4.334\times 10^8` :math:`-3.741\times 10^6` :math:`-2.935\times 10^5` :math:`\phantom{-}1.527\times 10^7` :math:`\phantom{-}3.835\times 10^5` + :math:`\phantom{-}6.734\times 10^6` :math:`-3.741\times 10^6` :math:`\phantom{-}2.743\times 10^7` :math:`-4.592\times 10^4` :math:`-6.869\times 10^2` :math:`-4.742\times 10^6` + :math:`-3.382\times 10^7` :math:`-2.935\times 10^5` :math:`-4.592\times 10^4` :math:`\phantom{-}2.167\times 10^7` :math:`-6.279\times 10^4` :math:`\phantom{-}1.430\times 10^6` + :math:`-2.627\times 10^7` :math:`\phantom{-}1.527\times 10^7` :math:`-6.869\times 10^2` :math:`-6.279\times 10^4` :math:`\phantom{-}1.970\times 10^7` :math:`\phantom{-}1.209\times 10^7` + :math:`-4.736\times 10^8` :math:`\phantom{-}3.835\times 10^5` :math:`-4.742\times 10^6` :math:`\phantom{-}1.430\times 10^6` :math:`\phantom{-}1.209\times 10^7` :math:`\phantom{-}4.406\times 10^8` + =================================== =================================== =================================== =================================== =================================== =================================== + +.. note:: The errors between the result and the reference are caused by the difference of modeling of the trailing edge. If reduce the trailing edge skin to a single thin layer, then the difference between the trailing edge shapes is minimized, and the two resulting stiffness matrices are basically the same, as shown in :numref:`Fig. %s `. + +.. figure:: /figures/examplemh104_comparison.png + :name: fig_mh104_comparison + :width: 6in + :align: center + + Comparison of stiffness matrices after modifying the trailing edge. diff --git a/doc/user/source/contents/examples/example_airfoil_recover.rst b/doc/user/source/contents/examples/example_airfoil_recover.rst index 1f97bca..04cc28f 100644 --- a/doc/user/source/contents/examples/example_airfoil_recover.rst +++ b/doc/user/source/contents/examples/example_airfoil_recover.rst @@ -22,18 +22,18 @@ Complete files can be found in ``examples\ex_airfoil_r\``, including ``mh104.sg.K``, ``mh104.sg.opt``, ``mh104.sg.v0``, ``mh104.sg.v1S``, and ``mh104.sg.v22``. -.. csv-table:: Sectional forces and moments - :name: table_mh104_1dresults - :header-rows: 1 - :align: center +.. csv-table:: Sectional forces and moments + :name: table_mh104_1dresults + :header-rows: 1 + :align: center - Quantity, Value - ":math:`F_1`, N", 1 - ":math:`F_2`, N", 2 - ":math:`F_3`, N", 3 - ":math:`M_1`, Nm", 4 - ":math:`M_2`, Nm", 5 - ":math:`M_3`, Nm", 6 + Quantity, Value + ":math:`F_1`, N", 1 + ":math:`F_2`, N", 2 + ":math:`F_3`, N", 3 + ":math:`M_1`, Nm", 4 + ":math:`M_2`, Nm", 5 + ":math:`M_3`, Nm", 6 @@ -42,10 +42,10 @@ Complete files can be found in ``examples\ex_airfoil_r\``, including Result ------ -.. figure:: /figures/examplemh104r.png - :name: fig_mh104r - :width: 6in - :align: center +.. figure:: /figures/examplemh104r.png + :name: fig_mh104r + :width: 6in + :align: center - Contour plot of recovered nodal stress SN11. + Contour plot of recovered nodal stress SN11. diff --git a/doc/user/source/contents/examples/index.rst b/doc/user/source/contents/examples/index.rst new file mode 100644 index 0000000..676a6d3 --- /dev/null +++ b/doc/user/source/contents/examples/index.rst @@ -0,0 +1,16 @@ +Examples +======== + +.. toctree:: + :maxdepth: 1 + :caption: Table of Contents + + example_box + example_pipe + example_tube + example_channel + example_airfoil + example_airfoil_recover + example_uh60a_fi + +.. example_ibeam diff --git a/doc/user/source/contents/guide.rst b/doc/user/source/contents/guide/index.rst similarity index 81% rename from doc/user/source/contents/guide.rst rename to doc/user/source/contents/guide/index.rst index db789e0..c3944c5 100644 --- a/doc/user/source/contents/guide.rst +++ b/doc/user/source/contents/guide/index.rst @@ -1,6 +1,6 @@ .. _section-prevabs_guide: -Guide for Preparing Input Files +Input Guide =============================== In PreVABS, a cross section is defined through two aspects: components and global configuration, as shown in :numref:`Fig. %s `. @@ -8,12 +8,12 @@ Components are built from geometry and materials. The geometry aspect comprises definitions of base points and base lines. The material aspect includes material properties, lamina thicknesses, layup stacking sequences, etc. The global configuration contains the files included, transformation, meshing options, and analysis settings. -.. figure:: /figures/chart1.png - :name: fig_csfiles1 - :width: 75% - :align: center +.. figure:: /figures/chart1.png + :name: fig_csfiles1 + :width: 75% + :align: center - Cross section definition in PreVABS. + Cross section definition in PreVABS. .. In PreVABS, the key to preparing input files for a cross section is .. defining *Segment*\ s. A *Segment* is a unique combination of a @@ -43,21 +43,21 @@ Except the base points file, which has a file extension .dat, all other files us A top level cross section file stores all information that will be discussed in the following sections. The input syntax for this main file is shown in :numref:`Listing %s `. -.. code-block:: xml - :linenos: - :name: code_crosssection - :caption: Input syntax for the cross section file. +.. code-block:: xml + :linenos: + :name: code_crosssection + :caption: Input syntax for the cross section file. - - ... - ... - ... - ... - ... - ... - ... - ... - + + ... + ... + ... + ... + ... + ... + ... + ... + Data of geometry and layup can be arranged in two ways, controlled by the attribute ``format``: @@ -84,15 +84,15 @@ Data of geometry and layup can be arranged in two ways, controlled by the attrib -.. toctree:: +.. toctree:: :maxdepth: 2 :caption: Subtopics - guide/pre_coordinate - guide/pre_shape - guide/pre_material - guide/pre_component - guide/pre_recover - guide/pre_overall + pre_coordinate + pre_shape + pre_material + pre_component + pre_recover + pre_overall diff --git a/doc/user/source/contents/guide/pre_shape.rst b/doc/user/source/contents/guide/pre_shape.rst index 187d7fe..71a3959 100644 --- a/doc/user/source/contents/guide/pre_shape.rst +++ b/doc/user/source/contents/guide/pre_shape.rst @@ -294,30 +294,29 @@ There are two ways of defining an arc as shown in :numref:`Fig. %s ` - - - ... - -
c
- s - e - ccw - -
c
- s - a - - 10 -
- ... - +.. code-block:: xml + :linenos: + :name: code_baseline_arc + :caption: Input syntax for the base lines shown in :numref:`Fig. %s ` + + + ... + +
c
+ s + e + ccw + 9 +
+ + +
c
+ s + a + 10 +
+ ... +
**Specification** @@ -354,25 +353,25 @@ There are two ways of defining a circle. - Use center and a point on the circle. -.. code-block:: xml - :linenos: - :name: code_baseline_circle - :caption: Input syntax for the 'circle' type base line. - - - ... - -
c
- r -
- - -
c
- p - cw -
- ... -
+.. code-block:: xml + :linenos: + :name: code_baseline_circle + :caption: Input syntax for the 'circle' type base line. + + + ... + +
c
+ r +
+ + +
c
+ p + cw +
+ ... +
**Specification** diff --git a/doc/user/source/contents/ref/bib.rst b/doc/user/source/contents/ref/bib.rst new file mode 100644 index 0000000..235a1e2 --- /dev/null +++ b/doc/user/source/contents/ref/bib.rst @@ -0,0 +1,11 @@ +References +========== + +.. [YU2012] Yu, W., Hodges, D. H. and Ho, J. C. (2012) 'Variational asymptotic beam sectional analysis - An updated version', International Journal of Engineering Science, 59, pp. 40-64. + +.. [YU2005] Yu, W. and Hodges, D. H. (2005) 'Generalized Timoshenko Theory of the Variational Asymptotic Beam Sectional Analysis', Journal of the American Helicopter Society, 50(1), pp. 46-55. + +.. [CHEN2010] Chen, H., Yu, W. and Capellaro, M. (2010) 'A critical assessment of computer tools for calculating composite wind turbine blade properties', Wind Energy, 13(6), pp. 497-516. + + + diff --git a/doc/user/source/contents/changelog.rst b/doc/user/source/contents/ref/changelog.rst similarity index 100% rename from doc/user/source/contents/changelog.rst rename to doc/user/source/contents/ref/changelog.rst diff --git a/doc/user/source/contents/ref/index.rst b/doc/user/source/contents/ref/index.rst new file mode 100644 index 0000000..fa40cd3 --- /dev/null +++ b/doc/user/source/contents/ref/index.rst @@ -0,0 +1,11 @@ +References +========== + +.. toctree:: + :maxdepth: 2 + + xml + bib + changelog + + diff --git a/doc/user/source/contents/xml.rst b/doc/user/source/contents/ref/xml.rst similarity index 100% rename from doc/user/source/contents/xml.rst rename to doc/user/source/contents/ref/xml.rst diff --git a/doc/user/source/contents/references.rst b/doc/user/source/contents/references.rst deleted file mode 100644 index b7e412b..0000000 --- a/doc/user/source/contents/references.rst +++ /dev/null @@ -1,11 +0,0 @@ -References -========== - -.. [YU2012] Yu, W., Hodges, D. H. and Ho, J. C. (2012) ‘Variational asymptotic beam sectional analysis – An updated version’, International Journal of Engineering Science, 59, pp. 40–64. - -.. [YU2005] Yu, W. and Hodges, D. H. (2005) ‘Generalized Timoshenko Theory of the Variational Asymptotic Beam Sectional Analysis’, Journal of the American Helicopter Society, 50(1), pp. 46–55. - -.. [CHEN2010] Chen, H., Yu, W. and Capellaro, M. (2010) ‘A critical assessment of computer tools for calculating composite wind turbine blade properties’, Wind Energy, 13(6), pp. 497–516. - - - diff --git a/doc/user/source/contents/start/index.rst b/doc/user/source/contents/start/index.rst new file mode 100644 index 0000000..ed52d89 --- /dev/null +++ b/doc/user/source/contents/start/index.rst @@ -0,0 +1,10 @@ +Getting Started +=============== + +.. toctree:: + :maxdepth: 2 + + install + run + + diff --git a/doc/user/source/contents/install.rst b/doc/user/source/contents/start/install.rst similarity index 100% rename from doc/user/source/contents/install.rst rename to doc/user/source/contents/start/install.rst diff --git a/doc/user/source/contents/run.rst b/doc/user/source/contents/start/run.rst similarity index 100% rename from doc/user/source/contents/run.rst rename to doc/user/source/contents/start/run.rst diff --git a/doc/user/source/index.rst b/doc/user/source/index.rst index 3b612cb..8d6e465 100644 --- a/doc/user/source/index.rst +++ b/doc/user/source/index.rst @@ -6,16 +6,55 @@ PreVABS Documentation ======================= -.. toctree:: - :maxdepth: 2 - :caption: Table of Contents - - contents/install - contents/run - contents/tutorial - contents/guide - contents/examples - contents/changelog - contents/xml - contents/references +PreVABS is a preprocessing tool for VABS and SwiftComp. +It helps users to create cross-sections and write input files. +.. .. toctree:: +.. :maxdepth: 2 +.. :caption: Table of Contents + +.. contents/install +.. contents/run +.. contents/tutorial +.. contents/guide +.. contents/examples +.. contents/changelog +.. contents/xml +.. contents/references + + +Manual +-------------------- + + +.. grid:: 2 + :gutter: 4 + + .. grid-item-card:: + + .. toctree:: + :maxdepth: 2 + + /contents/start/index + + .. grid-item-card:: + + .. toctree:: + :maxdepth: 2 + + /contents/guide/index + + .. grid-item-card:: + + .. toctree:: + :maxdepth: 2 + + /contents/tutorial + /contents/examples/index + + .. grid-item-card:: + + .. toctree:: + :maxdepth: 2 + + /contents/ref/index