{"id":5924,"date":"2023-09-10T13:00:22","date_gmt":"2023-09-10T12:00:22","guid":{"rendered":"http:\/\/mosaic-modeling.de\/?page_id=5924"},"modified":"2024-07-14T15:05:48","modified_gmt":"2024-07-14T14:05:48","slug":"use-of-transformations-i-orthogonal-collocation-on-finite-elements","status":"publish","type":"page","link":"https:\/\/mosaic-modeling.de\/?page_id=5924","title":{"rendered":"Use of Transformations I \u2013 Orthogonal Collocation on Finite Elements"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">On this page<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/mosaic-modeling.de\/?page_id=5924\/#Model-description\" >Model description<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/mosaic-modeling.de\/?page_id=5924\/#Workflow\" >Workflow<\/a><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/mosaic-modeling.de\/?page_id=5924\/#Notation-of-the-discretization\" >Notation of the discretization<\/a><ul class='ez-toc-list-level-5' ><li class='ez-toc-heading-level-5'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/mosaic-modeling.de\/?page_id=5924\/#Base-names\" >Base names<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-5'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/mosaic-modeling.de\/?page_id=5924\/#Indices\" >Indices<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/mosaic-modeling.de\/?page_id=5924\/#Equations-and-equation-system-for-discretization-scheme\" >Equations and equation system for discretization scheme<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/mosaic-modeling.de\/?page_id=5924\/#Transformation\" >Transformation<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/mosaic-modeling.de\/?page_id=5924\/#Discretized-equation-system\" >Discretized equation system<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<p style=\"text-align: justify;\">This example demonstrates how to automatically transform an existing ODE or DAE system into an algebraic equation system using a specified discretization scheme, in this case orthogonal collocation on finite elements.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Model-description\"><\/span>Model description<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>As application, we choose the ODE system of the example <a href=\"http:\/\/mosaic-modeling.de\/?page_id=5721\">Use of Basic Elements III &#8211; Orthogonal Collocation on Finite Elements<\/a>.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Workflow\"><\/span>Workflow<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>We now demonstrate the workflow. The first step is the definition of a notation for the discretization scheme.<\/p>\n<h4><span class=\"ez-toc-section\" id=\"Notation-of-the-discretization\"><\/span>Notation of the discretization<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>Set up a notation with the following base names and indices:<\/p>\n<h5 style=\"text-align: justify;\"><span class=\"ez-toc-section\" id=\"Base-names\"><\/span>Base names<span class=\"ez-toc-section-end\"><\/span><\/h5>\n<ul>\n<li><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/mosaic-modeling.de\/wp-content\/ql-cache\/quicklatex.com-819ab50990df5adf82bea9dfa75ffff2_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#68;&#101;&#108;&#116;&#97;&#32;&#116;\" title=\"Rendered by QuickLaTeX.com\" height=\"13\" width=\"21\" style=\"vertical-align: 0px;\"\/>, length of finite element<\/li>\n<li><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/mosaic-modeling.de\/wp-content\/ql-cache\/quicklatex.com-0e55b0b3943237ccfc96979505679274_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#97;\" title=\"Rendered by QuickLaTeX.com\" height=\"8\" width=\"9\" style=\"vertical-align: 0px;\"\/>, collocation coefficient<\/li>\n<li><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/mosaic-modeling.de\/wp-content\/ql-cache\/quicklatex.com-7bb7ea974a0484534815a1039429908e_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#100;&#76;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"21\" style=\"vertical-align: 0px;\"\/>, Derivative of lagrange basis polynomial<\/li>\n<li><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/mosaic-modeling.de\/wp-content\/ql-cache\/quicklatex.com-fd9cb27edab3f0a8a249bc80cc9c6ee2_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#116;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"6\" style=\"vertical-align: 0px;\"\/>, time<\/li>\n<li><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/mosaic-modeling.de\/wp-content\/ql-cache\/quicklatex.com-38461fc041e953482219abf5d4cce1cb_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#121;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"9\" style=\"vertical-align: -4px;\"\/>, state variable<\/li>\n<\/ul>\n<h5><span class=\"ez-toc-section\" id=\"Indices\"><\/span>Indices<span class=\"ez-toc-section-end\"><\/span><\/h5>\n<ul>\n<li><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/mosaic-modeling.de\/wp-content\/ql-cache\/quicklatex.com-fda390ccc503779a7603e6418e2f97de_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#99;&#112;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"17\" style=\"vertical-align: -4px;\"\/>, index of collocation points 1&#8230;NCP<\/li>\n<li><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/mosaic-modeling.de\/wp-content\/ql-cache\/quicklatex.com-9820e1c5cf7504303717dee444684464_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#102;&#101;\" title=\"Rendered by QuickLaTeX.com\" height=\"16\" width=\"19\" style=\"vertical-align: -4px;\"\/>, index of collocation points 1&#8230;NFE<\/li>\n<li><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/mosaic-modeling.de\/wp-content\/ql-cache\/quicklatex.com-e95ddacdef491f24b3e82811cdcfcc1c_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#105;&#112;\" title=\"Rendered by QuickLaTeX.com\" height=\"16\" width=\"15\" style=\"vertical-align: -4px;\"\/>, index of interpolation polynomials 1&#8230;NIP<\/li>\n<\/ul>\n<p>The resulting notation has ID 185836.<\/p>\n<h4><span class=\"ez-toc-section\" id=\"Equations-and-equation-system-for-discretization-scheme\"><\/span>Equations and equation system for discretization scheme<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>For orthogonal collocation, two equations are required:<\/p>\n<p class=\"ql-left-displayed-equation\" style=\"line-height: 100px;\"><span class=\"ql-right-eqno\"> &nbsp; <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/mosaic-modeling.de\/wp-content\/ql-cache\/quicklatex.com-73214f7efa915e6b2bdb8c730e43c085_l3.png\" height=\"100\" width=\"249\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#97;&#108;&#105;&#103;&#110;&#42;&#125; &#38;&#92;&#102;&#114;&#97;&#99;&#123;&#92;&#109;&#97;&#116;&#104;&#114;&#109;&#123;&#100;&#125;&#121;&#125;&#123;&#92;&#109;&#97;&#116;&#104;&#114;&#109;&#123;&#100;&#125;&#116;&#125;&#32;&#61;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#49;&#125;&#123;&#92;&#68;&#101;&#108;&#116;&#97;&#32;&#116;&#95;&#123;&#102;&#101;&#125;&#125;&#32;&#92;&#115;&#117;&#109;&#95;&#123;&#105;&#112;&#61;&#48;&#125;&#94;&#123;&#78;&#73;&#80;&#125;&#32;&#121;&#95;&#123;&#99;&#112;&#61;&#105;&#112;&#44;&#102;&#101;&#125;&#32;&#92;&#99;&#100;&#111;&#116;&#32;&#100;&#76;&#95;&#123;&#105;&#112;&#44;&#99;&#112;&#125;&#32;&#92;&#92;&#91;&#50;&#101;&#120;&#93; &#38;&#121;&#95;&#123;&#99;&#112;&#61;&#78;&#67;&#80;&#44;&#102;&#101;&#45;&#49;&#125;&#32;&#61;&#32;&#121;&#95;&#123;&#99;&#112;&#61;&#48;&#44;&#102;&#101;&#125;&#46; &#92;&#101;&#110;&#100;&#123;&#97;&#108;&#105;&#103;&#110;&#42;&#125;\" title=\"Rendered by QuickLaTeX.com\"\/><\/p>\n<p>The first equation is the discretization, the second ensures continuity between finite elements. Enter these equations by taking the following steps:<\/p>\n<ol>\n<li>Load the notation of the discretization scheme<\/li>\n<li>Enter the first equation<\/li>\n<li>Save the equation<\/li>\n<li>Enter and save the second equation<\/li>\n<li>Go to the tab Equation system, add these two equations, and save the equation system<\/li>\n<\/ol>\n<p>The equations have IDs 185833 and 185834. The equation system has ID 185835.<\/p>\n<h4><span class=\"ez-toc-section\" id=\"Transformation\"><\/span>Transformation<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>Now, we define the transformation. To this end, go to the Transformation tab and take the following steps:<\/p>\n<ol>\n<li>Add a helpful description for the transformation<\/li>\n<li>Add the <em>equation system<\/em> with the discretization scheme as EQS (Discretization) and the <em>notation<\/em> of the model you want to transform (here: ID 8480) as Super Notation<br \/>\n<strong>Attention<\/strong>: the super notation must include three free indices that can be matched in the next step. If these do not exist, add them to the notation before you proceed<\/li>\n<li>Go to the tab Variable Matching and add <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/mosaic-modeling.de\/wp-content\/ql-cache\/quicklatex.com-fd9cb27edab3f0a8a249bc80cc9c6ee2_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#116;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"6\" style=\"vertical-align: 0px;\"\/> for both the Discretization and the Super Notation. Match them<\/li>\n<li>In the bottom right corner, click on &#8220;Add discretization index&#8221; and write <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/mosaic-modeling.de\/wp-content\/ql-cache\/quicklatex.com-4232de5b0fb3f5c73470e33384946367_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#116;&#95;&#123;&#102;&#101;&#125;\" title=\"Rendered by QuickLaTeX.com\" height=\"18\" width=\"20\" style=\"vertical-align: -6px;\"\/>. The index <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/mosaic-modeling.de\/wp-content\/ql-cache\/quicklatex.com-9820e1c5cf7504303717dee444684464_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#102;&#101;\" title=\"Rendered by QuickLaTeX.com\" height=\"16\" width=\"19\" style=\"vertical-align: -4px;\"\/> appears at the bottom right corner for the Sub Notation. Add the index <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/mosaic-modeling.de\/wp-content\/ql-cache\/quicklatex.com-31318c5dcb226c69e0818e5f7d2422b5_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#105;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"6\" style=\"vertical-align: 0px;\"\/> (can be different for any other used-defined notation) for the Super Notation<\/li>\n<li>Go to the tab Index Matching and match the indices as follows (left: Discretization, right: Super Notation):\n<ul>\n<li style=\"text-align: justify;\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/mosaic-modeling.de\/wp-content\/ql-cache\/quicklatex.com-2febae0d21eef75e4f2916789d88730a_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#99;&#112;&#32;&#92;&#108;&#101;&#102;&#116;&#114;&#105;&#103;&#104;&#116;&#97;&#114;&#114;&#111;&#119;&#32;&#99;\" title=\"Rendered by QuickLaTeX.com\" height=\"13\" width=\"52\" style=\"vertical-align: -4px;\"\/><\/li>\n<li style=\"text-align: justify;\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/mosaic-modeling.de\/wp-content\/ql-cache\/quicklatex.com-88c220746fdbcc7a1e376b60be3dd351_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#102;&#101;&#32;&#92;&#108;&#101;&#102;&#116;&#114;&#105;&#103;&#104;&#116;&#97;&#114;&#114;&#111;&#119;&#32;&#105;\" title=\"Rendered by QuickLaTeX.com\" height=\"16\" width=\"52\" style=\"vertical-align: -4px;\"\/><\/li>\n<li style=\"text-align: justify;\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/mosaic-modeling.de\/wp-content\/ql-cache\/quicklatex.com-069c4d0cbc43179c7eda92667a98e59e_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#105;&#112;&#32;&#92;&#108;&#101;&#102;&#116;&#114;&#105;&#103;&#104;&#116;&#97;&#114;&#114;&#111;&#119;&#32;&#106;\" title=\"Rendered by QuickLaTeX.com\" height=\"16\" width=\"51\" style=\"vertical-align: -4px;\"\/><\/li>\n<\/ul>\n<\/li>\n<li>Go to the tab Variable Predermination. MOSAICmodeling can sometimes have issues with recognizing the correct variables to be discretized. Therefore, add <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/mosaic-modeling.de\/wp-content\/ql-cache\/quicklatex.com-ec5583fa081a1e03212c151e3c222412_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#122;\" title=\"Rendered by QuickLaTeX.com\" height=\"8\" width=\"9\" style=\"vertical-align: 0px;\"\/> as variable and set it as state variable<\/li>\n<li>Save the transformation<\/li>\n<\/ol>\n<p>The transformation is available with ID 185836.<\/p>\n<h4><span class=\"ez-toc-section\" id=\"Discretized-equation-system\"><\/span>Discretized equation system<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>To discretize the original equation system, go to the Equation System tab and take the following steps.<\/p>\n<ol style=\"text-align: justify;\">\n<li>Load the notation of the original ODE system (ID 8480)<\/li>\n<li>Click on &#8220;Add EQU\/EQS&#8221; and select the equation system of the original ODE system (ID 8482), but do not confirm to close this popup window<\/li>\n<li>Make sure that the Naming policy is integrate<\/li>\n<li>Turn on the option Apply transformation(s) and select the saved transformation<\/li>\n<li>Confirm<\/li>\n<li>Save the equation system.<\/li>\n<li>If you go to the tab Preview and click on &#8220;Update Preview&#8221;, you should now see the automatically discretized ODE system<\/li>\n<\/ol>\n<p>The equation system has ID 185837. You could now go to the &#8220;Simulation&#8221; section, load this equation system, specify the indices, and use the variable specification from the example <a href=\"http:\/\/mosaic-modeling.de\/?page_id=5721\">Use of Basic Elements III &#8211; Orthogonal Collocation on Finite Elements<\/a>. The solution should be the same.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This example demonstrates how to automatically transform an existing ODE or DAE system into an algebraic equation system using a specified discretization scheme, in this case orthogonal collocation on finite elements. Model description As application, we choose the ODE system of the example Use of Basic Elements III &#8211; Orthogonal Collocation on Finite Elements. Workflow [&hellip;]<\/p>\n","protected":false},"author":252,"featured_media":0,"parent":5920,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-5924","page","type-page","status-publish","czr-hentry"],"_links":{"self":[{"href":"https:\/\/mosaic-modeling.de\/index.php?rest_route=\/wp\/v2\/pages\/5924","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mosaic-modeling.de\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/mosaic-modeling.de\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/mosaic-modeling.de\/index.php?rest_route=\/wp\/v2\/users\/252"}],"replies":[{"embeddable":true,"href":"https:\/\/mosaic-modeling.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5924"}],"version-history":[{"count":9,"href":"https:\/\/mosaic-modeling.de\/index.php?rest_route=\/wp\/v2\/pages\/5924\/revisions"}],"predecessor-version":[{"id":6154,"href":"https:\/\/mosaic-modeling.de\/index.php?rest_route=\/wp\/v2\/pages\/5924\/revisions\/6154"}],"up":[{"embeddable":true,"href":"https:\/\/mosaic-modeling.de\/index.php?rest_route=\/wp\/v2\/pages\/5920"}],"wp:attachment":[{"href":"https:\/\/mosaic-modeling.de\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5924"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}