From cb34cea9463706033c4297c8867d989ec5f5413d Mon Sep 17 00:00:00 2001 From: Thomas Saigre <60920471+thomas-saigre@users.noreply.github.com> Date: Sun, 16 Jul 2023 16:31:49 +0200 Subject: [PATCH 1/8] Update introduction.adoc Add json specifications for boundaries conditions also minor typo fixes @prudhomm @vincentchabannes can you please review that this additions are corrects ? I'm not sure in particular of `expr1` and `expr2` for Robin conditions --- .../modules/cfpdes/partials/introduction.adoc | 92 ++++++++++++++++--- 1 file changed, 77 insertions(+), 15 deletions(-) diff --git a/toolboxes/modules/cfpdes/partials/introduction.adoc b/toolboxes/modules/cfpdes/partials/introduction.adoc index c0159431..79a61bf5 100644 --- a/toolboxes/modules/cfpdes/partials/introduction.adoc +++ b/toolboxes/modules/cfpdes/partials/introduction.adoc @@ -35,7 +35,7 @@ By utilizing coefficient forms in PDE toolboxes, researchers and engineers can c A lot of PDE(s) can be writen in a generic form, and depends mainly on the definition of coefficients. -The generic form that we use is describe by the next equation, find stem:[u: \Omega \subset \mathbb{R}^d \longrightarrow \mathbb{R}^n] with stem:[d=2,3] and stem:[n=1] (stem:[u] is a scalar field) or stem:[n=d](stem:[u] is a vector field) such that +The generic form that we use is describe by the next equation, find stem:[u: \Omega \subset \mathbb{R}^d \longrightarrow \mathbb{R}^n] with stem:[d=2,3] and stem:[n=1] (stem:[u] is a scalar field) or stem:[n=d](stem:[u] is a vector field) such that [stem] ++++ @@ -64,7 +64,7 @@ Many problems are multiphysics (i.e. several unknowns) and the generic form can The system of stem:[N] equations reads then: -For stem:[i=1\dots N], find stem:[u_i: \Omega \subset \mathbb{R}^d \longrightarrow \mathbb{R}^{n_i}] with stem:[d=2,3] and stem:[n_i=1] (stem:[u_i] is a scalar field) or stem:[n_i=d](stem:[u_i] is a vector field) such that +For stem:[i=1\dots N], find stem:[u_i: \Omega \subset \mathbb{R}^d \longrightarrow \mathbb{R}^{n_i}] with stem:[d=2,3] and stem:[n_i=1] (stem:[u_i] is a scalar field) or stem:[n_i=d](stem:[u_i] is a vector field) such that [stem] ++++ \begin{eqnarray*} @@ -85,7 +85,7 @@ We need also to respect some constraint on the coefficient shape as described in | stem:[d] | scalar | scalar -| stem:[c] | scalar or matrix | scalar or matrix +| stem:[c] | scalar or matrix | scalar or matrix | stem:[\alpha] | vectorial | scalar or matrix | stem:[\gamma] | vectorial | matrix | stem:[\beta] | vectorial | vectorial @@ -213,7 +213,7 @@ Dirichlet boundary condition is a type of boundary condition commonly used in pa It specifies the value of the solution at the boundary of the domain. In other words, it prescribes the behavior of the solution at the boundary. -The condition may depend on the space variable stem:[x], time stem:[t], parameters stem:[\mu] and other unknowns stem:[u_1, \dots, u_N] than the current one. +The condition may depend on the space variable stem:[x], time stem:[t], parameters stem:[\mu] and other unknowns stem:[u_1, \dots, u_N] than the current one. For example, in a heat transfer problem, a Dirichlet boundary condition may specify the temperature at the boundary of the domain. In a fluid flow problem, a Dirichlet boundary condition may specify the velocity or pressure at the boundary. @@ -233,7 +233,29 @@ u_i = g_i(x,t,\mu), \quad i=1,\dots,N ++++ **** -The user provides the expression for stem:[(g_i)_{i=1\dots N}] in the `.json` file only if Dirichlet conditions are used. +The user provides the expression for stem:[(g_i)_{i=1\dots N}] in the `.json` file only if Dirichlet conditions are used. + +.Examples of Dirichlet boundary condition +[.examp#ex:boudaryconditions:dirichlet] +**** +[source, json] +---- +"Dirichlet": <1> +{ + "Gamma0": <2> + { + "markers": ["Bottom","Right","Bottom-Left","Top-Right"], <3> + "expr": "0" <4> + } +} +---- +**** + +<1> Keyword for Dirichlet conditions. +<2> The physical entity (associated to the mesh) to which the condition is applied. +<3> The markers of the boundary where the Dirichlet condition is applied. +<4> The expression for the Dirichlet stem:[g_i]. See more details in xref:toolboxes:ROOT:modeling-analysis-using-json-files.adoc#_boundaryconditions[the json specifications]. + === Neumann @@ -247,7 +269,7 @@ In a fluid flow problem, a Neumann boundary condition may specify the normal str The Neumann boundary condition is also essential in determining a unique solution to a PDE problem. It provides additional information about the behavior of the solution at the boundary, which complements the Dirichlet boundary condition. Together, the Dirichlet and Neumann boundary conditions form a complete set of boundary conditions that fully specify the PDE problem. -The Neumann conditions may depend on the space variable stem:[x], time stem:[t], parameters stem:[\mu] and the unknowns stem:[u_1, \dots, u_N]. +The Neumann conditions may depend on the space variable stem:[x], time stem:[t], parameters stem:[\mu] and the unknowns stem:[u_1, \dots, u_N]. The shape of the Neumann condition is the same as the unknown shape. @@ -264,6 +286,25 @@ The shape of the Neumann condition is the same as the unknown shape. The user provides the expression for stem:[(g_i)_{i=1\dots N}] in the `.json` file only if Neumann conditions are used. +.Examples of Neumann boundary condition +[.examp#ex:boudaryconditions:neumann] +**** +[source, json] +---- +"Neumann": <1> +{ + "top": <2> + { + "expr":"-h_top*(heat_T-T0_top):h_top:heat_T:T0_top" <3> + } +} +---- +**** + +<1> Keyword for Robin conditions. +<2> The physical entity (associated to the mesh) to which the condition is applied. +<3> Expression of stem:[g_i]. See more details in xref:toolboxes:ROOT:modeling-analysis-using-json-files.adoc#_boundaryconditions[the json specifications]. + === Robin Robin boundary condition is a type of boundary condition that combines both Dirichlet and Neumann boundary conditions. @@ -275,7 +316,7 @@ In a fluid flow problem, a Robin boundary condition may specify a slip coefficie The Robin boundary condition is useful in modeling situations where the boundary is in contact with a medium that has a different thermal or mechanical behavior than the domain. It provides a more realistic and accurate description of the physical problem than using only Dirichlet or Neumann boundary conditions. -The Robin conditions may depend on the space variable stem:[x], time stem:[t], parameters stem:[\mu]. +The Robin conditions may depend on the space variable stem:[x], time stem:[t], parameters stem:[\mu]. The shape of the Robin condition is the same as the unknown shape. @@ -292,6 +333,27 @@ The shape of the Robin condition is the same as the unknown shape. The user provides the expression for stem:[(\eta_i)_{i=1\dots N}] and stem:[(\zeta_i)_{i=1\dots N}] in the `.json` file only if Robin conditions are used. +.Examples of Robin boundary condition +[.examp#ex:boudaryconditions:robin] +**** +[source, json] +---- +"Robin": <1> +{ + "top": <2> + { + "expr1": "h_top:h_top", <3> + "expr2": "h_top*T0_top:h_top:T0_top" <4> + } +} +---- +**** + +<1> Keyword for Robin conditions. +<2> The physical entity (associated to the mesh) to which the condition is applied. +<3> Expression of stem:[\eta_i]. See more details in xref:toolboxes:ROOT:modeling-analysis-using-json-files.adoc#_boundaryconditions[the json specifications]. +<4> Expression of stem:[\zeta_i]. + == Finite Element Approximation @@ -301,11 +363,11 @@ Here's an example of an asciidoc table with a list of finite elements supported |=== | Finite Element | polynomial order | Description -| Pch | 0,1,2 | Piecewise continuous scalar functions of arbitrary degree stem:[k] -| Pchv| 0,1,2 | Piecewise continuous vectorial functions of arbitrary degree stem:[k] +| `Pch` | 0,1,2 | Piecewise continuous scalar functions of arbitrary degree stem:[k] +| `Pchv`| 0,1,2 | Piecewise continuous vectorial functions of arbitrary degree stem:[k] -| RT | k=0 | Raviart-Thomas element of degree stem:[k] -| NED | Nedelec's first family of curl-conforming elements +| `RT` | k=0 | Raviart-Thomas element of degree stem:[k] +| `NED` | | Nedelec's first family of curl-conforming elements |=== @@ -370,7 +432,7 @@ They have also been used in the development of advanced simulation tools for eng === GaLS The Galerkin least squares formulation is a stabilized finite element method used to solve partial differential equations. The variational formulation of the Galerkin least squares method is given by: -Find $u \in V$ such that +Find stem:[u \in V] such that [stem] ++++ @@ -416,11 +478,11 @@ The Streamline Upwind Petrov Galerkin (SUPG) method is a stabilized finite eleme a_{\text{SUPG}}(u,v) = a(u,v) + \tau \left( \mathbf{\beta} \cdot \nabla u - \frac{1}{2} \Delta u \right) \left( \mathbf{b} \cdot \nabla v - \frac{1}{2} \Delta v \right) ++++ -where stem:[\tau] is a positive constant that controls the strength of the stabilization term, stem:[\beta] is a vector field that represents the direction and magnitude of the convection term in the PDE, and $\Delta$ is the Laplace operator. The SUPG method introduces an additional term that penalizes the gradient of the solution in the direction of the convection term, which improves the accuracy and stability of the numerical solution for convection-dominated problems. The SUPG method has been shown to be effective in solving a wide range of PDE problems, including fluid dynamics and heat transfer. +where stem:[\tau] is a positive constant that controls the strength of the stabilization term, stem:[\beta] is a vector field that represents the direction and magnitude of the convection term in the PDE, and stem:[\Delta] is the Laplace operator. The SUPG method introduces an additional term that penalizes the gradient of the solution in the direction of the convection term, which improves the accuracy and stability of the numerical solution for convection-dominated problems. The SUPG method has been shown to be effective in solving a wide range of PDE problems, including fluid dynamics and heat transfer. === {cfpdes} toolbox -Given a `cfpdes` equation named `myeq`, SUPG and GaLS can be used as stabilisation methods. +Given a `cfpdes` equation named `myeq`, SUPG and GaLS can be used as stabilisation methods. To enable them use, in the command-line or `.cfg` file, the option `cfpdes.eq.stabilitsation=1` and define the stabilisation type `cfpdes.eq.stabilitsation.type=gls #supg#unusual-gls #gls` .Stabilisation methods @@ -440,4 +502,4 @@ Examples are available https://github.com/feelpp/feelpp/tree/develop/toolboxes/c == Next steps * [x] xref:user:python:pyfeelpptoolboxes/cfpdes.poisson.adoc[The Poisson equation] -//* [x] The advection-diffusion-reaction equation \ No newline at end of file +//* [x] The advection-diffusion-reaction equation From c6df538df2ccf52fdc470f6dcb74c3c178b767d8 Mon Sep 17 00:00:00 2001 From: Thomas Saigre Date: Tue, 15 Aug 2023 10:54:59 +0200 Subject: [PATCH 2/8] replace item with <.> /cc @prudhomm --- .../modules/cfpdes/partials/introduction.adoc | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/toolboxes/modules/cfpdes/partials/introduction.adoc b/toolboxes/modules/cfpdes/partials/introduction.adoc index 79a61bf5..6894f6d9 100644 --- a/toolboxes/modules/cfpdes/partials/introduction.adoc +++ b/toolboxes/modules/cfpdes/partials/introduction.adoc @@ -251,10 +251,10 @@ The user provides the expression for stem:[(g_i)_{i=1\dots N}] in the `.json` fi ---- **** -<1> Keyword for Dirichlet conditions. -<2> The physical entity (associated to the mesh) to which the condition is applied. -<3> The markers of the boundary where the Dirichlet condition is applied. -<4> The expression for the Dirichlet stem:[g_i]. See more details in xref:toolboxes:ROOT:modeling-analysis-using-json-files.adoc#_boundaryconditions[the json specifications]. +<.> Keyword for Dirichlet conditions. +<.> The physical entity (associated to the mesh) to which the condition is applied. +<.> The markers of the boundary where the Dirichlet condition is applied. +<.> The expression for the Dirichlet stem:[g_i]. See more details in xref:toolboxes:ROOT:modeling-analysis-using-json-files.adoc#_boundaryconditions[the json specifications]. === Neumann @@ -301,9 +301,9 @@ The user provides the expression for stem:[(g_i)_{i=1\dots N}] in the `.json` fi ---- **** -<1> Keyword for Robin conditions. -<2> The physical entity (associated to the mesh) to which the condition is applied. -<3> Expression of stem:[g_i]. See more details in xref:toolboxes:ROOT:modeling-analysis-using-json-files.adoc#_boundaryconditions[the json specifications]. +<.> Keyword for Robin conditions. +<.> The physical entity (associated to the mesh) to which the condition is applied. +<.> Expression of stem:[g_i]. See more details in xref:toolboxes:ROOT:modeling-analysis-using-json-files.adoc#_boundaryconditions[the json specifications]. === Robin @@ -349,10 +349,10 @@ The user provides the expression for stem:[(\eta_i)_{i=1\dots N}] and stem:[(\ze ---- **** -<1> Keyword for Robin conditions. -<2> The physical entity (associated to the mesh) to which the condition is applied. -<3> Expression of stem:[\eta_i]. See more details in xref:toolboxes:ROOT:modeling-analysis-using-json-files.adoc#_boundaryconditions[the json specifications]. -<4> Expression of stem:[\zeta_i]. +<.> Keyword for Robin conditions. +<.> The physical entity (associated to the mesh) to which the condition is applied. +<.> Expression of stem:[\eta_i]. See more details in xref:toolboxes:ROOT:modeling-analysis-using-json-files.adoc#_boundaryconditions[the json specifications]. +<.> Expression of stem:[\zeta_i]. == Finite Element Approximation From d90c78eb070806ae3ce0a00ac54dee5bcddce378 Mon Sep 17 00:00:00 2001 From: Thomas Saigre Date: Thu, 21 Sep 2023 14:35:25 +0200 Subject: [PATCH 3/8] remove trailing spaces --- .../modules/cfpdes/partials/introduction.adoc | 96 +++++++++---------- 1 file changed, 48 insertions(+), 48 deletions(-) diff --git a/toolboxes/modules/cfpdes/partials/introduction.adoc b/toolboxes/modules/cfpdes/partials/introduction.adoc index 6894f6d9..c6ab5b5f 100644 --- a/toolboxes/modules/cfpdes/partials/introduction.adoc +++ b/toolboxes/modules/cfpdes/partials/introduction.adoc @@ -6,7 +6,7 @@ Coefficient forms in PDE (Partial Differential Equation) toolboxes refer to the representation of the PDE problem in terms of its coefficient functions. In the context of PDEs, the coefficients represent the properties and characteristics of the equation, such as the diffusion coefficient, convection coefficient, reaction coefficient, and others. -Different types of PDEs, such as elliptic, parabolic, or hyperbolic equations, have specific coefficient forms associated with them. +Different types of PDEs, such as elliptic, parabolic, or hyperbolic equations, have specific coefficient forms associated with them. These coefficient forms capture the behavior and physical properties of the underlying phenomena being modeled. For example, in the context of the Poisson equation, a commonly encountered elliptic equation, the coefficient form is often written as: @@ -16,16 +16,16 @@ For example, in the context of the Poisson equation, a commonly encountered elli -\nabla \cdot (c \nabla u) + a u = f ++++ -Here, +Here, -* stem:[c] represents the diffusion coefficient, -* stem:[a] represents the reaction coefficient, -* stem:[u] is the unknown function, and -* stem:[f] is the source term. +* stem:[c] represents the diffusion coefficient, +* stem:[a] represents the reaction coefficient, +* stem:[u] is the unknown function, and +* stem:[f] is the source term. The coefficient form provides a structured way to express the PDE problem and allows for efficient numerical solution techniques. -PDE toolboxes, such as those available in {feelpp}, provide functionality to handle coefficient forms of various PDEs. +PDE toolboxes, such as those available in {feelpp}, provide functionality to handle coefficient forms of various PDEs. They offer tools for defining the coefficient functions, setting boundary conditions, discretizing the problem, and solving it numerically using appropriate algorithms and methods. By utilizing coefficient forms in PDE toolboxes, researchers and engineers can conveniently formulate and solve complex PDE problems with the necessary coefficients and boundary conditions, enabling the analysis and simulation of a wide range of physical phenomena. @@ -86,10 +86,10 @@ We need also to respect some constraint on the coefficient shape as described in | stem:[d] | scalar | scalar | stem:[c] | scalar or matrix | scalar or matrix -| stem:[\alpha] | vectorial | scalar or matrix -| stem:[\gamma] | vectorial | matrix -| stem:[\beta] | vectorial | vectorial -| stem:[a] | scalar | scalar +| stem:[\alpha] | vectorial | scalar or matrix +| stem:[\gamma] | vectorial | matrix +| stem:[\beta] | vectorial | vectorial +| stem:[a] | scalar | scalar | stem:[f] | scalar | vectorial |=== @@ -161,7 +161,7 @@ NOTE: In the following, `mu` is a parameter defined e.g. in the `Parameters` sec "alpha": "x*y*mu:x:y:mu", // scalar "alpha": "{x,y,y,x*mu}:x:y:mu", // 2D matrix "gamma": "{x,y,y,x}:x:y", // 2D matrix - "beta": "{t+x,y}:x:y:t", + "beta": "{t+x,y}:x:y:t", "a": "x+y:x:y", "f": "{x,x+y*t}:x:y:t" } @@ -207,16 +207,16 @@ NOTE: the shape of the initial condition must be the same as the unknown shape. Here are supported boundary conditions -=== Dirichlet +=== Dirichlet -Dirichlet boundary condition is a type of boundary condition commonly used in partial differential equations. -It specifies the value of the solution at the boundary of the domain. -In other words, it prescribes the behavior of the solution at the boundary. +Dirichlet boundary condition is a type of boundary condition commonly used in partial differential equations. +It specifies the value of the solution at the boundary of the domain. +In other words, it prescribes the behavior of the solution at the boundary. The condition may depend on the space variable stem:[x], time stem:[t], parameters stem:[\mu] and other unknowns stem:[u_1, \dots, u_N] than the current one. -For example, in a heat transfer problem, a Dirichlet boundary condition may specify the temperature at the boundary of the domain. -In a fluid flow problem, a Dirichlet boundary condition may specify the velocity or pressure at the boundary. +For example, in a heat transfer problem, a Dirichlet boundary condition may specify the temperature at the boundary of the domain. +In a fluid flow problem, a Dirichlet boundary condition may specify the velocity or pressure at the boundary. The Dirichlet boundary condition is essential in determining a unique solution to a PDE problem. Without it, the solution would be underdetermined, and there would be an infinite number of solutions that satisfy the PDE. @@ -228,7 +228,7 @@ The shape of the Dirichlet condition is the same as the unknown shape. [stem] ++++ \begin{eqnarray*} -u_i = g_i(x,t,\mu), \quad i=1,\dots,N +u_i = g_i(x,t,\mu), \quad i=1,\dots,N \end{eqnarray*} ++++ **** @@ -259,14 +259,14 @@ The user provides the expression for stem:[(g_i)_{i=1\dots N}] in the `.json` fi === Neumann -Neumann boundary condition is another type of boundary condition commonly used in partial differential equations. -It specifies the normal derivative of the solution at the boundary of the domain. +Neumann boundary condition is another type of boundary condition commonly used in partial differential equations. +It specifies the normal derivative of the solution at the boundary of the domain. In other words, it prescribes the flux of the solution across the boundary. -For example, in a heat transfer problem, a Neumann boundary condition may specify the heat flux at the boundary of the domain. -In a fluid flow problem, a Neumann boundary condition may specify the normal stress or shear stress at the boundary. +For example, in a heat transfer problem, a Neumann boundary condition may specify the heat flux at the boundary of the domain. +In a fluid flow problem, a Neumann boundary condition may specify the normal stress or shear stress at the boundary. -The Neumann boundary condition is also essential in determining a unique solution to a PDE problem. +The Neumann boundary condition is also essential in determining a unique solution to a PDE problem. It provides additional information about the behavior of the solution at the boundary, which complements the Dirichlet boundary condition. Together, the Dirichlet and Neumann boundary conditions form a complete set of boundary conditions that fully specify the PDE problem. The Neumann conditions may depend on the space variable stem:[x], time stem:[t], parameters stem:[\mu] and the unknowns stem:[u_1, \dots, u_N]. @@ -307,12 +307,12 @@ The user provides the expression for stem:[(g_i)_{i=1\dots N}] in the `.json` fi === Robin -Robin boundary condition is a type of boundary condition that combines both Dirichlet and Neumann boundary conditions. -It specifies a linear combination of the solution and its normal derivative at the boundary of the domain. -In other words, it prescribes both the value and the flux of the solution at the boundary. +Robin boundary condition is a type of boundary condition that combines both Dirichlet and Neumann boundary conditions. +It specifies a linear combination of the solution and its normal derivative at the boundary of the domain. +In other words, it prescribes both the value and the flux of the solution at the boundary. -For example, in a heat transfer problem, a Robin boundary condition may specify a heat transfer coefficient that relates the temperature difference between the boundary and the surrounding medium to the heat flux at the boundary. -In a fluid flow problem, a Robin boundary condition may specify a slip coefficient that relates the velocity difference between the boundary and the surrounding medium to the shear stress at the boundary. +For example, in a heat transfer problem, a Robin boundary condition may specify a heat transfer coefficient that relates the temperature difference between the boundary and the surrounding medium to the heat flux at the boundary. +In a fluid flow problem, a Robin boundary condition may specify a slip coefficient that relates the velocity difference between the boundary and the surrounding medium to the shear stress at the boundary. The Robin boundary condition is useful in modeling situations where the boundary is in contact with a medium that has a different thermal or mechanical behavior than the domain. It provides a more realistic and accurate description of the physical problem than using only Dirichlet or Neumann boundary conditions. @@ -371,7 +371,7 @@ Here's an example of an asciidoc table with a list of finite elements supported |=== -This table lists various finite elements supported by {cfpdes}, along with a brief description of each element. +This table lists various finite elements supported by {cfpdes}, along with a brief description of each element. NOTE: {feelpp} supports a wider range of finite elements, including piecewise arbitrary order polynomials, as well as mixed finite elements such as Raviart-Thomas and Brezzi-Douglas-Marini elements or Nedelec's first families. @@ -384,7 +384,7 @@ The backward difference formula scheme is a numerical method for approximating t stem:[f'(x_n) ≈ \frac{1}{\Delta t} \left(\alpha f(x_n) + \beta f(x_{n-1}) + \gamma f(x_{n-2}) + \dots\right)] -where stem:[\Delta t] is the time step size, stem:[x_n] is the point at which the derivative is approximated, and stem:[\alpha], stem:[\beta], stem:[\gamma], etc. are coefficients that depend on the order of the scheme. +where stem:[\Delta t] is the time step size, stem:[x_n] is the point at which the derivative is approximated, and stem:[\alpha], stem:[\beta], stem:[\gamma], etc. are coefficients that depend on the order of the scheme. For example, the first-order backward difference formula scheme is: @@ -406,25 +406,25 @@ The theta scheme is a numerical method for solving partial differential equation \frac{u_i^{n+1} - u_i^n}{\Delta t} = \theta f(u_{i}^{n+1}) + (1-\theta)f(u_{i}^{n}) ++++ -where stem:[u_i^n] is the numerical solution at the stem:[i]-th spatial point and stem:[n]-th time step, stem:[\Delta t] and stem:[\Delta x] are the time and spatial step sizes, and stem:[\theta] is a parameter that determines the weighting between the current and previous time steps. +where stem:[u_i^n] is the numerical solution at the stem:[i]-th spatial point and stem:[n]-th time step, stem:[\Delta t] and stem:[\Delta x] are the time and spatial step sizes, and stem:[\theta] is a parameter that determines the weighting between the current and previous time steps. -When stem:[\theta=0], the scheme reduces to the backward difference formula, whereas when stem:[\theta=1], it reduces to the forward difference formula. +When stem:[\theta=0], the scheme reduces to the backward difference formula, whereas when stem:[\theta=1], it reduces to the forward difference formula. For stem:[\theta=0.5], the scheme is known as the **Crank-Nicolson scheme**, which is a popular choice due to its stability and accuracy. The theta scheme is widely used in numerical simulations of heat transfer, fluid flow, and other physical phenomena. == Stabilized finite element methods -:adr: advection diffusion reaction +:adr: advection diffusion reaction -Stabilized finite element methods are a class of numerical methods used to solve partial differential equations (PDEs). +Stabilized finite element methods are a class of numerical methods used to solve partial differential equations (PDEs). These methods are designed to overcome the limitations of traditional finite element methods, which can suffer from numerical instabilities and inaccuracies when applied to certain types of PDEs, such as those with convection-dominated or highly oscillatory solutions. -Stabilized finite element methods introduce additional terms to the weak form of the PDE, which act as stabilizers to improve the accuracy and stability of the numerical solution. +Stabilized finite element methods introduce additional terms to the weak form of the PDE, which act as stabilizers to improve the accuracy and stability of the numerical solution. These terms are typically chosen to balance the effects of convection, diffusion, and reaction in the PDE, and to ensure that the numerical solution satisfies certain physical and mathematical constraints. -There are several types of stabilized finite element methods, including **streamline diffusion**, **Petrov-Galerkin**, and **least-squares** methods. +There are several types of stabilized finite element methods, including **streamline diffusion**, **Petrov-Galerkin**, and **least-squares** methods. Each method has its own strengths and weaknesses, and the choice of method depends on the specific problem being solved. -Stabilized finite element methods have been successfully applied to a wide range of PDE problems, including fluid dynamics, heat transfer, and structural mechanics. +Stabilized finite element methods have been successfully applied to a wide range of PDE problems, including fluid dynamics, heat transfer, and structural mechanics. They have also been used in the development of advanced simulation tools for engineering and scientific applications. {cfpdes} toolbox provides the possibility to use stabilized finite element methods (GaLS and SUPG) for equations such as the {adr} equation. @@ -454,9 +454,9 @@ l(v) = \int_{\Omega} f v dx ++++ -Here, stem:[\epsilon], stem:[\beta], and stem:[\gamma] are positive constants that control the balance between diffusion, convection, and reaction in the PDE, and stem:[\alpha] is a positive constant that controls the strength of the stabilization term on the boundary. -The Galerkin least squares method introduces additional terms to the bilinear form that act as stabilizers to improve the accuracy and stability of the numerical solution. -These terms are chosen to minimize the residual of the PDE in a least squares sense, and are typically expressed in terms of the gradient of the solution and its higher-order derivatives. +Here, stem:[\epsilon], stem:[\beta], and stem:[\gamma] are positive constants that control the balance between diffusion, convection, and reaction in the PDE, and stem:[\alpha] is a positive constant that controls the strength of the stabilization term on the boundary. +The Galerkin least squares method introduces additional terms to the bilinear form that act as stabilizers to improve the accuracy and stability of the numerical solution. +These terms are chosen to minimize the residual of the PDE in a least squares sense, and are typically expressed in terms of the gradient of the solution and its higher-order derivatives. The Galerkin least squares method has been shown to be effective in solving a wide range of PDE problems, including convection-dominated and highly oscillatory problems. [stem] @@ -465,8 +465,8 @@ a_{\text{GLS}}(u,v) = a(u,v) + \tau \int_{\Omega} \left( \epsilon \nabla u - \be ++++ where stem:[\tau] is a positive constant that controls the strength of the stabilization term. -The first term in the additional terms is a diffusion term that penalizes the gradient of the solution, while the second term is a convection term that penalizes the solution itself. -The third term is a reaction term that ensures that the numerical solution satisfies certain physical and mathematical constraints. +The first term in the additional terms is a diffusion term that penalizes the gradient of the solution, while the second term is a convection term that penalizes the solution itself. +The third term is a reaction term that ensures that the numerical solution satisfies certain physical and mathematical constraints. The Galerkin least squares method with these additional terms has been shown to be effective in improving the accuracy and stability of the numerical solution for a wide range of PDE problems. === SUPG @@ -482,21 +482,21 @@ where stem:[\tau] is a positive constant that controls the strength of the stabi === {cfpdes} toolbox -Given a `cfpdes` equation named `myeq`, SUPG and GaLS can be used as stabilisation methods. +Given a `cfpdes` equation named `myeq`, SUPG and GaLS can be used as stabilisation methods. To enable them use, in the command-line or `.cfg` file, the option `cfpdes.eq.stabilitsation=1` and define the stabilisation type `cfpdes.eq.stabilitsation.type=gls #supg#unusual-gls #gls` .Stabilisation methods |=== -| type | +| type | | `gls` | default option -| `supg` | -| `unusual-gls` | +| `supg` | +| `unusual-gls` | |=== -Examples are available https://github.com/feelpp/feelpp/tree/develop/toolboxes/coefficientformpdes/cases/adr[here] +Examples are available https://github.com/feelpp/feelpp/tree/develop/toolboxes/coefficientformpdes/cases/adr[here] == Next steps From 1b2c287b1eaae7ee28deb8a8d0b1f729db928298 Mon Sep 17 00:00:00 2001 From: Thomas Saigre Date: Thu, 21 Sep 2023 14:36:08 +0200 Subject: [PATCH 4/8] add more details in code #180 /cc @prudhomm @vincentchabannes can you please review that what I added is correct ? --- .../modules/cfpdes/partials/introduction.adoc | 88 +++++++++++++------ 1 file changed, 61 insertions(+), 27 deletions(-) diff --git a/toolboxes/modules/cfpdes/partials/introduction.adoc b/toolboxes/modules/cfpdes/partials/introduction.adoc index c6ab5b5f..27bfdf9d 100644 --- a/toolboxes/modules/cfpdes/partials/introduction.adoc +++ b/toolboxes/modules/cfpdes/partials/introduction.adoc @@ -104,17 +104,22 @@ NOTE: In the following, `mu` is a parameter defined e.g. in the `Parameters` sec { "Models": { - "cfpdes":{ - "equations":["myscalarpde"] + "cfpdes": + { + "equations":["myscalarpde"] <1> }, - "mypde":{ - "setup":{ - "unknown":{ - "basis":"Pch1", // the unknown is a scalar field - "name":"u", - "symbol":"u" + "myscalarpde": <2> + { + "setup": + { + "unknown": + { + "basis":"Pch1", // the unknown is a scalar field <3> + "name":"u", <4> + "symbol":"u" <4> }, - "coefficients":{ + "coefficients": <5> + { "d": "1", "c": "x+y:x:y", "c": "{x+y,x,y,x-y}:t:x:y", // 2D matrix @@ -128,7 +133,8 @@ NOTE: In the following, `mu` is a parameter defined e.g. in the `Parameters` sec } } }, - "Parameters":{ + "Parameters": <6> + { "mu": 0.5 } } @@ -143,17 +149,22 @@ NOTE: In the following, `mu` is a parameter defined e.g. in the `Parameters` sec { "Models": { - "cfpdes":{ - "equations":["myvectorialpde"] + "cfpdes": + { + "equations":["myvectorialpde"] <1> }, - "mypde":{ - "setup":{ - "unknown":{ - "basis":"Pch1v", // the unknown is a vector field - "name":"u", - "symbol":"u" + "myvectorialpde": <2> + { + "setup": + { + "unknown": + { + "basis":"Pch1v", // the unknown is a vector field <3> + "name":"u", <4> + "symbol":"u" <4> }, - "coefficients":{ + "coefficients": <5> + { "d": "1", "c": "x+y:x:y", "c": "{x+y,x,y,x-y}:t:x:y", // 2D matrix @@ -168,7 +179,8 @@ NOTE: In the following, `mu` is a parameter defined e.g. in the `Parameters` sec } } }, - "Parameters":{ + "Parameters": <6> + { "mu": 0.5 } } @@ -176,6 +188,13 @@ NOTE: In the following, `mu` is a parameter defined e.g. in the `Parameters` sec ---- **** +<.> The name of the equation to be considered, if many equations are defined, they must be listed here. +<.> The name of the equation for definition. +<.> Functional space used in the discretization of the equation. +<.> The name, and symbol of the unknown. +<.> Definition of the coefficients involved in the equation. +<.> Definition of parameters involved in the equation. + == Initial Conditions @@ -188,13 +207,18 @@ NOTE: the shape of the initial condition must be the same as the unknown shape. **** [source,json] ---- -"InitialConditions":{ - "mypde": { - "u": { - "Expression": { - "myic": { - "markers": "Omega", - "expr": "2*cos(t)*sin(x)*cos(y):t:x:y" +"InitialConditions": <1> +{ + "mypde": <2> + { + "u": <3> + { + "Expression": + { + "myic": <4> + { + "markers": "Omega", <5> + "expr": "2*cos(t)*sin(x)*cos(y):t:x:y" <6> } } } @@ -203,6 +227,14 @@ NOTE: the shape of the initial condition must be the same as the unknown shape. ---- **** +<.> Keyword for initial conditions +<.> The name of the equation +<.> The name of the unknown +<.> The name of the initial condition +<.> The physical entity (associated to the mesh) to which the condition is applied. +<.> The expression of the initial condition. See more details in xref:toolboxes:ROOT:modeling-analysis-using-json-files.adoc#_initialconditions[the json specifications]. + + == Boundary Conditions Here are supported boundary conditions @@ -305,6 +337,8 @@ The user provides the expression for stem:[(g_i)_{i=1\dots N}] in the `.json` fi <.> The physical entity (associated to the mesh) to which the condition is applied. <.> Expression of stem:[g_i]. See more details in xref:toolboxes:ROOT:modeling-analysis-using-json-files.adoc#_boundaryconditions[the json specifications]. +NOTE: Because of the presence of `heat_T` in the expression, this will be considered as a non-linear condition. + === Robin Robin boundary condition is a type of boundary condition that combines both Dirichlet and Neumann boundary conditions. From 788649e4b3e2bc30364559939a2f5e04149c30e0 Mon Sep 17 00:00:00 2001 From: Thomas Saigre Date: Mon, 30 Jun 2025 11:17:59 +0200 Subject: [PATCH 5/8] fix tables errors --- .../modules/hdg/pages/mixedelasticity.adoc | 2 +- toolboxes/modules/heat/pages/toolbox.adoc | 33 +++++++++---------- toolboxes/modules/mso4sc/pages/run.adoc | 2 +- .../pages/quarterturn/index.adoc | 4 +-- 4 files changed, 20 insertions(+), 21 deletions(-) diff --git a/toolboxes/modules/hdg/pages/mixedelasticity.adoc b/toolboxes/modules/hdg/pages/mixedelasticity.adoc index f437aa7a..af2c0215 100644 --- a/toolboxes/modules/hdg/pages/mixedelasticity.adoc +++ b/toolboxes/modules/hdg/pages/mixedelasticity.adoc @@ -216,7 +216,7 @@ The assembling for the constant part is inside the initialization, while the ass == Run simulations Programme available to run simulations: -[souece,mpirun] +[source,mpirun] ---- mpirun -np 4 feelpp_toolbox_mixed-elasticity-model_3DP{}_G{}` ---- diff --git a/toolboxes/modules/heat/pages/toolbox.adoc b/toolboxes/modules/heat/pages/toolbox.adoc index 54d0a42f..d7df0c71 100644 --- a/toolboxes/modules/heat/pages/toolbox.adoc +++ b/toolboxes/modules/heat/pages/toolbox.adoc @@ -285,15 +285,14 @@ NOTE: The expressions given to the convective heat flux boundary condition can d === Radiative heat flux WARNING: Radiative heat transfer is not yet available in the toolboxes. An application implementing radiative heat is currently available in feelpp/doc/manual/heat. -New sections in the JSON configuration file are necessary. +New sections in the JSON configuration file are necessary. Firstly, the "Coating" section, which contains information about the radiative properties of the emitting surfaces, especially the value of the emissivity constant stem:[\epsilon]. .JSON properties of Coating section |=== | Property | Description | Value Type | Is Optional - -| `markers` | list of mesh markers associated to a radiative surface | `string`, `array of string` | no -| `epsilon` | value of the emissivity of the radiative surface | `string` | no | +| `markers` | list of mesh markers associated to a radiative surface | `string`, `array of string` | no +| `epsilon` | value of the emissivity of the radiative surface | `string` | no |=== [source,json] @@ -307,7 +306,7 @@ Firstly, the "Coating" section, which contains information about the radiative p "epsilon": "0.5" } } -} +} ---- Secondly, the "radiative_enclosure_heat_flux" and "radiative_blackbody_heat_flux" sections, inside the "BoundaryConditions" section, which specify the decomposition of the radiating boundaries into cavities, independent of each other, open or closed, where the radiative boundary conditions are imposed. @@ -317,8 +316,8 @@ Secondly, the "radiative_enclosure_heat_flux" and "radiative_blackbody_heat_flux | Property | Description | Value Type | Values | Is Optional | `enclosure` | Specifies if the cavity is isolated (closed) or if it communicates with a black body (open) | `string` | `open`, `closed` | no -| `markers` | list of mesh markers associated to a radiative surface | `string`, `array of string` | |no -| `sigma` | Stefan-Boltzmann constant | `string`, `array of string` | |no +| `markers` | list of mesh markers associated to a radiative surface | `string`, `array of string` | |no +| `sigma` | Stefan-Boltzmann constant | `string`, `array of string` | |no | `Tref` | Reference temperature of the black body (only for open enclosures) | `string` | | yes | `viewfactors` | Information for the computation/loading of view factors of the cavity | JSON | | no |=== @@ -328,15 +327,15 @@ Secondly, the "radiative_enclosure_heat_flux" and "radiative_blackbody_heat_flux | Property | Description | Value Type | Values | Is Optional | `status` | Specifies if view factors have to be computed or loaded from file | `string` | `compute`, `load` | no -| `filename`| File name for the computation of view factors (JSON format) or loading (CSV) | `string` | |no +| `filename`| File name for the computation of view factors (JSON format) or loading (CSV) | `string` | |no |=== .JSON properties of the "radiative_blackbody_heat_flux/CavityName" section |=== | Property | Description | Value Type | Values | Is Optional -| `markers` | list of mesh markers associated to a radiative surface | `string`, `array of string` | |no -| `sigma` | Stefan-Boltzmann constant | `string`, `array of string` | |no +| `markers` | list of mesh markers associated to a radiative surface | `string`, `array of string` | |no +| `sigma` | Stefan-Boltzmann constant | `string`, `array of string` | |no | `Tref` | Reference temperature of the black body (only for open enclosures) | `string` | | yes |=== @@ -355,11 +354,11 @@ Secondly, the "radiative_enclosure_heat_flux" and "radiative_blackbody_heat_flux "status":"load", "filename":"$cfgdir/VF_Matrix_Cavity_1.csv" // "status":"compute", - // "filename":"$cfgdir/rectangular_cavity_vf.json" + // "filename":"$cfgdir/rectangular_cavity_vf.json" } } }, - "radiative_blackbody_heat_flux": { + "radiative_blackbody_heat_flux": { "Gamma_BBC_1": { "markers": ["Gamma_B_11","Gamma_B_12"], "Tref": "Tref_C+273.15:Tref_C", @@ -367,8 +366,8 @@ Secondly, the "radiative_enclosure_heat_flux" and "radiative_blackbody_heat_flux } } } - } -} + } +} ---- Finally, an additional JSON file per cavity is necessary if the view factor matrix needs to be computed. This file will specify the algorithm to be use in order to compute the view factors, and the markers forming the cavity. @@ -377,10 +376,10 @@ Finally, an additional JSON file per cavity is necessary if the view factor matr |=== | Property | Description | Value Type | Values | Is Optional -| `type` | Choose between raytracing (obstructed and non-obstructed cavities) and quadrature (only non-obstructed cavities) | `string` |`Raytracing`, `UnobstructedPlanar` |no +| `type` | Choose between raytracing (obstructed and non-obstructed cavities) and quadrature (only non-obstructed cavities) | `string` |`Raytracing`, `UnobstructedPlanar` |no | `algorithm` | Choose the algorithm (only for UnobstructedPlanar) between DoubleAreaIntegration (2D) and SingleAreaIntegration (3D) | `string` |`DoubleAreaIntegration`, `SingleAreaIntegration` | yes | `quadrature_order` | Quadrature order (only for UnobstructedPlanar) | `int` | | yes -| `markers` | list of mesh markers associated to the cavity | `string`, `array of string` | |no +| `markers` | list of mesh markers associated to the cavity | `string`, `array of string` | |no |=== [source,json] @@ -390,7 +389,7 @@ Finally, an additional JSON file per cavity is necessary if the view factor matr "type": "UnobstructedPlanar", "algorithm":"DoubleAreaIntegration", "quadrature_order":2, - "markers":["RadiativeSurface1", "RadiativeSurface2","RadiativeSurface3"], + "markers":["RadiativeSurface1", "RadiativeSurface2","RadiativeSurface3"], "description": "The viewfactor of a closed triangular cavity." } } diff --git a/toolboxes/modules/mso4sc/pages/run.adoc b/toolboxes/modules/mso4sc/pages/run.adoc index 26c0b564..18a9e61c 100644 --- a/toolboxes/modules/mso4sc/pages/run.adoc +++ b/toolboxes/modules/mso4sc/pages/run.adoc @@ -57,7 +57,7 @@ We detail the different field in the following tables. We differentiate the keys [options="header,footer"] |=== | Key | Description | Default | Notes -| **feelpp__case** | string that describe the location of the testcase | Depending on the toolbox |A default test-case is proposed but more are availbe in the Feel/toolbox repository | +| **feelpp__case** | string that describe the location of the testcase | Depending on the toolbox |A default test-case is proposed but more are availbe in the Feel/toolbox repository | **feelpp__cli** | command line options | "" | For advanced usage only |=== diff --git a/toolboxes/modules/thermoelectric/pages/quarterturn/index.adoc b/toolboxes/modules/thermoelectric/pages/quarterturn/index.adoc index 4469159c..4716f512 100644 --- a/toolboxes/modules/thermoelectric/pages/quarterturn/index.adoc +++ b/toolboxes/modules/thermoelectric/pages/quarterturn/index.adoc @@ -57,8 +57,8 @@ In 3D, this is the same geometry, but extruded along the z axis. [options="header"] |=== -| Name | Description | Marker | Value | Unit | -| stem:[\sigma] | electric conductivity | omega | stem:[4.8e7] | stem:[S.m^{-1}] | +| Name | Description | Marker | Value | Unit +| stem:[\sigma] | electric conductivity | omega | stem:[4.8e7] | stem:[S.m^{-1}] | stem:[k] | thermic conductivity | omega | stem:[377] | stem:[W/(m.K)] |=== From cd1fd9f651182daa840a73d1a305ed317247a22e Mon Sep 17 00:00:00 2001 From: Thomas Saigre Date: Mon, 30 Jun 2025 11:31:54 +0200 Subject: [PATCH 6/8] other small fixes [ci skip] --- .../index.adoc | 1 + .../fsi/pages/lid-driven-cavity/index.adoc | 28 +++++++++---------- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/toolboxes/modules/cfd/pages/laminar_isothermal_backward_facing_step/index.adoc b/toolboxes/modules/cfd/pages/laminar_isothermal_backward_facing_step/index.adoc index 298b01ef..88f23dbe 100644 --- a/toolboxes/modules/cfd/pages/laminar_isothermal_backward_facing_step/index.adoc +++ b/toolboxes/modules/cfd/pages/laminar_isothermal_backward_facing_step/index.adoc @@ -176,5 +176,6 @@ include::example$laminar_isothermal_backward_facing_step/reattachment-length.csv [[Armaly]] 1. B.F. Armaly, F. Durst, J.C.F. Pereira and B. Schoenung, Experimental and Theoretical Investigation of Backward-Facing Step Flow, J. Fluid Mech., 1983, Vol. 127, pp. 473-496 + [[Denham]] 2. M.K. Denham and M.A. Patrick, Laminar Flow over a DownstreamFacing Step in a Two-Dimensional Flow Channel, Trans. Inst. Chem. Engrs, 1974, Vol. 52, p .361 diff --git a/toolboxes/modules/fsi/pages/lid-driven-cavity/index.adoc b/toolboxes/modules/fsi/pages/lid-driven-cavity/index.adoc index 6152d174..86e6c2c5 100644 --- a/toolboxes/modules/fsi/pages/lid-driven-cavity/index.adoc +++ b/toolboxes/modules/fsi/pages/lid-driven-cavity/index.adoc @@ -9,12 +9,12 @@ Computer codes, used for the acquisition of results, are from Vincent <>, <>, <> and <>. -== Problem Description +== Problem Description We study here an incompressible fluid flowing into a cavity, where its walls are elastic. We use the following geometry to represent it. [[img-geometry1]] -image::lid-driven-cavity/LidDriven.png[caption="Figure 1 : ", title="Geometry of lid-driven cavity flow.", alt="LidDriven Geometry", width="600", align="center"] +image::lid-driven-cavity/LidDriven.png[caption="Figure 1 : ", title="Geometry of lid-driven cavity flow.", alt="LidDriven Geometry", width="600", align="center"] The domain stem:[\Omega_f^*] is define by a square stem:[ [0,1\]^2 ], stem:[\Gamma^{i,*}_f] and stem:[\Gamma^{o,*}_f] are respectively the flow entrance and the flow outlet. A constant flow velocity, following the stem:[x] axis, will be imposed on stem:[\Gamma_f^{h,*}] border, while a null flow velocity will be imposed on stem:[\Gamma_f^{f,*}]. This last point represent also a non-slip condition for the fluid. @@ -23,7 +23,7 @@ Furthermore, we add a structure domain, at the bottom of the fluid one, named st During this test, we will observe the displacement of a point stem:[A], positioned at stem:[(0;0.5)], into the stem:[y] direction, and compare our results to ones found in other references. -=== Boundary conditions +=== Boundary conditions Before enunciate the boundary conditions, we need to describe a oscillatory velocity, following the $$x$$ axis and dependent of time. @@ -32,7 +32,7 @@ Before enunciate the boundary conditions, we need to describe a oscillatory velo v_{in} = 1-cos\left( \frac{2\pi t}{5} \right) ++++ -Then we can set +Then we can set * on stem:[\Gamma^{h,*}_f], an inflow Dirichlet condition : stem:[\boldsymbol{u}_{f} = ( v_{in}, 0 )] @@ -46,30 +46,30 @@ Then we can set * on stem:[\Gamma^{e,*}_s], a condition that lets these boundaries be free from constraints : stem:[\boldsymbol{F}_{s} \boldsymbol{\Sigma}_s \boldsymbol{n}_s = \boldsymbol{0}] -To them we also add the fluid-structure coupling conditions on stem:[\Gamma_{fsi}^*] : +To them we also add the fluid-structure coupling conditions on stem:[\Gamma_{fsi}^*] : [stem] ++++ \frac{\partial \boldsymbol{\eta_{s}} }{\partial t} - \boldsymbol{u}_f \circ \mathcal{A}^t_f - = \boldsymbol{0} \quad \left( \text{Velocities continuity}\right) + = \boldsymbol{0} \quad \left( \text{Velocities continuity}\right) ++++ [stem] ++++ \boldsymbol{F}_{s} \boldsymbol{\Sigma}_{s} \boldsymbol{n}^*_s + J_{\mathcal{A}^t_f} \boldsymbol{F}_{\mathcal{A}^t_f}^{-T} \hat{\boldsymbol{\sigma}}_f \boldsymbol{n}^*_f - = \boldsymbol{0} \quad \left( \text{ Constraint continuity}\right) + = \boldsymbol{0} \quad \left( \text{ Constraint continuity}\right) ++++ [stem] ++++ \boldsymbol{\varphi}_s^t - \mathcal{A}^t_f - = \boldsymbol{0} \quad \left( \text{Geometric continuity}\right) + = \boldsymbol{0} \quad \left( \text{Geometric continuity}\right) ++++ === Initial conditions To realize the simulations, we used a time step stem:[\Delta t] equals to stem:[0.01] s. - + == Inputs The following table displays the various fixed and variables @@ -82,7 +82,7 @@ parameters of this test-case. |stem:[E_s] | Young's modulus | stem:[250] | stem:[N.m^{-2}] |stem:[\nu_s] | Poisson's ratio | stem:[0] | dimensionless |stem:[\rho_s] | structure density | stem:[500] |stem:[kg.m^{-3}] -|stem:[\mu_f] |viscosity | stem:[1\times 10^{-3}] |stem:[m^2.s^{-1}] +|stem:[\mu_f] |viscosity | stem:[1\times 10^{-3}] |stem:[m^2.s^{-1}] |stem:[\rho_f] | density | stem:[1] | stem:[kg.m^{-3}] |=== @@ -95,7 +95,7 @@ To discretize space, we used stem:[P_N~-~P_{N-1}] Taylor-Hood finite elements. For the structure time discretization, Newmark-beta method is the one we used. And for the fluid time discretization, we used BDF, at order stem:[q]. -== Implementation +== Implementation All the codes files are into https://github.com/feelpp/feelpp/tree/develop/toolboxes/feel/feelmodels/fsi[FSI] @@ -113,13 +113,13 @@ Then we retry with a stem:[P_3~-~P_2] approximation for the fluid with a geometr | |=== -Finally we launch it with the same conditions as before, but with a deformed interface. +Finally we launch it with the same conditions as before, but with a deformed interface. |=== | |=== -=== Conclusion +=== Conclusion First at all, we can see that the first two tests offer us similar results, despite different orders uses. At contrary, the third result set are better than the others. @@ -136,7 +136,7 @@ The elastic wall thinness, in the stable case, should give an important refineme - [[[Gerbeau]]] J.F. Gerbeau, M. Vidrascu, et al, _A quasi-newton algorithm based on a reduced model for fluid-structure interaction problems in blood flows_, 2003. -- [[[Vazquez]]] J.G. Valdés Vazquèz et al, _Nonlinear analysis of orthotropic membrane and shell structures including fluid-structure interaction_, 2007. +- [[[Vàzquez]]] J.G. Valdés Vazquèz et al, _Nonlinear analysis of orthotropic membrane and shell structures including fluid-structure interaction_, 2007. - [[[KuttlerWall]]] U. Kuttler and W.A. Wall, _Fixed-point fluid–structure interaction solvers with dynamic relaxation_, Computational Mechanics, 2008. From ea67f0d47ded2d0ca5d9d991ed778318d1d23602 Mon Sep 17 00:00:00 2001 From: Thomas Saigre Date: Mon, 8 Sep 2025 15:04:19 +0200 Subject: [PATCH 7/8] back lost diffs [ci skip] --- .../fsi/pages/lid-driven-cavity/README.adoc | 28 +++++++++---------- .../modeling-analysis-using-json-files.adoc | 14 ++++------ 2 files changed, 20 insertions(+), 22 deletions(-) diff --git a/examples/modules/fsi/pages/lid-driven-cavity/README.adoc b/examples/modules/fsi/pages/lid-driven-cavity/README.adoc index a3626061..9bd4cc79 100644 --- a/examples/modules/fsi/pages/lid-driven-cavity/README.adoc +++ b/examples/modules/fsi/pages/lid-driven-cavity/README.adoc @@ -9,12 +9,12 @@ Computer codes, used for the acquisition of results, are from Vincent <>, <>, <> and <>. -== Problem Description +== Problem Description We study here an incompressible fluid flowing into a cavity, where its walls are elastic. We use the following geometry to represent it. [[img-geometry1]] -image::lid-driven-cavity/LidDriven.png[caption="Figure 1 : ", title="Geometry of lid-driven cavity flow.", alt="LidDriven Geometry", width="600", align="center"] +image::lid-driven-cavity/LidDriven.png[caption="Figure 1 : ", title="Geometry of lid-driven cavity flow.", alt="LidDriven Geometry", width="600", align="center"] The domain stem:[\Omega_f^*] is define by a square stem:[ [0,1\]^2 ], stem:[\Gamma^{i,*}_f] and stem:[\Gamma^{o,*}_f] are respectively the flow entrance and the flow outlet. A constant flow velocity, following the stem:[x] axis, will be imposed on stem:[\Gamma_f^{h,*}] border, while a null flow velocity will be imposed on stem:[\Gamma_f^{f,*}]. This last point represent also a non-slip condition for the fluid. @@ -23,7 +23,7 @@ Furthermore, we add a structure domain, at the bottom of the fluid one, named st During this test, we will observe the displacement of a point stem:[A], positioned at stem:[(0;0.5)], into the stem:[y] direction, and compare our results to ones found in other references. -=== Boundary conditions +=== Boundary conditions Before enunciate the boundary conditions, we need to describe a oscillatory velocity, following the $$x$$ axis and dependent of time. @@ -32,7 +32,7 @@ Before enunciate the boundary conditions, we need to describe a oscillatory velo v_{in} = 1-cos\left( \frac{2\pi t}{5} \right) ++++ -Then we can set +Then we can set * on stem:[\Gamma^{h,*}_f], an inflow Dirichlet condition : stem:[\boldsymbol{u}_{f} = ( v_{in}, 0 )] @@ -46,30 +46,30 @@ Then we can set * on stem:[\Gamma^{e,*}_s], a condition that lets these boundaries be free from constraints : stem:[\boldsymbol{F}_{s} \boldsymbol{\Sigma}_s \boldsymbol{n}_s = \boldsymbol{0}] -To them we also add the fluid-structure coupling conditions on stem:[\Gamma_{fsi}^*] : +To them we also add the fluid-structure coupling conditions on stem:[\Gamma_{fsi}^*] : [stem] ++++ \frac{\partial \boldsymbol{\eta_{s}} }{\partial t} - \boldsymbol{u}_f \circ \mathcal{A}^t_f - = \boldsymbol{0} \quad \left( \text{Velocities continuity}\right) + = \boldsymbol{0} \quad \left( \text{Velocities continuity}\right) ++++ [stem] ++++ \boldsymbol{F}_{s} \boldsymbol{\Sigma}_{s} \boldsymbol{n}^*_s + J_{\mathcal{A}^t_f} \boldsymbol{F}_{\mathcal{A}^t_f}^{-T} \hat{\boldsymbol{\sigma}}_f \boldsymbol{n}^*_f - = \boldsymbol{0} \quad \left( \text{ Constraint continuity}\right) + = \boldsymbol{0} \quad \left( \text{ Constraint continuity}\right) ++++ [stem] ++++ \boldsymbol{\varphi}_s^t - \mathcal{A}^t_f - = \boldsymbol{0} \quad \left( \text{Geometric continuity}\right) + = \boldsymbol{0} \quad \left( \text{Geometric continuity}\right) ++++ === Initial conditions To realize the simulations, we used a time step stem:[\Delta t] equals to stem:[0.01] s. - + == Inputs The following table displays the various fixed and variables @@ -82,7 +82,7 @@ parameters of this test-case. |stem:[E_s] | Young's modulus | stem:[250] | stem:[N.m^{-2}] |stem:[\nu_s] | Poisson's ratio | stem:[0] | dimensionless |stem:[\rho_s] | structure density | stem:[500] |stem:[kg.m^{-3}] -|stem:[\mu_f] |viscosity | stem:[1\times 10^{-3}] |stem:[m^2.s^{-1}] +|stem:[\mu_f] |viscosity | stem:[1\times 10^{-3}] |stem:[m^2.s^{-1}] |stem:[\rho_f] | density | stem:[1] | stem:[kg.m^{-3}] |=== @@ -95,7 +95,7 @@ To discretize space, we used stem:[P_N~-~P_{N-1}] Taylor-Hood finite elements. For the structure time discretization, Newmark-beta method is the one we used. And for the fluid time discretization, we used BDF, at order stem:[q]. -== Implementation +== Implementation All the codes files are into https://github.com/feelpp/feelpp/tree/develop/toolboxes/feel/feelmodels/fsi[FSI] @@ -113,13 +113,13 @@ Then we retry with a stem:[P_3~-~P_2] approximation for the fluid with a geometr | |=== -Finally we launch it with the same conditions as before, but with a deformed interface. +Finally we launch it with the same conditions as before, but with a deformed interface. |=== | |=== -=== Conclusion +=== Conclusion First at all, we can see that the first two tests offer us similar results, despite different orders uses. At contrary, the third result set are better than the others. @@ -136,7 +136,7 @@ The elastic wall thinness, in the stable case, should give an important refineme - [[[Gerbeau]]] J.F. Gerbeau, M. Vidrascu, et al, _A quasi-newton algorithm based on a reduced model for fluid-structure interaction problems in blood flows_, 2003. -- [[[Vazquez]]] J.G. Valdés Vazquèz et al, _Nonlinear analysis of orthotropic membrane and shell structures including fluid-structure interaction_, 2007. +- [[[Vàzquez]]] J.G. Valdés Vazquèz et al, _Nonlinear analysis of orthotropic membrane and shell structures including fluid-structure interaction_, 2007. - [[[KuttlerWall]]] U. Kuttler and W.A. Wall, _Fixed-point fluid–structure interaction solvers with dynamic relaxation_, Computational Mechanics, 2008. diff --git a/toolboxes/modules/ROOT/pages/modeling-analysis-using-json-files.adoc b/toolboxes/modules/ROOT/pages/modeling-analysis-using-json-files.adoc index f8c31a84..18aa760f 100644 --- a/toolboxes/modules/ROOT/pages/modeling-analysis-using-json-files.adoc +++ b/toolboxes/modules/ROOT/pages/modeling-analysis-using-json-files.adoc @@ -1,7 +1,4 @@ -= 2. Modeling and Analysis using the JSON files -:page-tags: manual -:page-illustration: pass:[toolboxes::manual.svg] -:description: We present the JSON files used to configure the physical models and the analysis. += Modeling and Analysis using the JSON files The Model JSON (`.json`) files allow to configure a set of partial differential equations, more precisely they define: @@ -393,8 +390,9 @@ g(f)=\frac{f-average(f)}{max(f)-min(f)} } ---- The previous snippet JSON will generate two normalizations of the distance function by using : -* min_max method with default range stem:[\left[0,1\right]] : generated symbol is `meshes__distanceToRange_walls_normalized_min_max`. -* mean method : generated symbol is `meshes__distanceToRange_walls_normalized_mean`. + +* `min_max` method with default range stem:[\[0, 1\]] : generated symbol is `meshes__distanceToRange_walls_normalized_min_max`. +* `mean` method : generated symbol is `meshes__distanceToRange_walls_normalized_mean`. .Example 2 of DistanceToRange normalisation setup [source,json] @@ -406,7 +404,7 @@ The previous snippet JSON will generate two normalizations of the distance funct } } ---- -The previous snippet JSON will generated one normalization Min-Max of the distance function on interval stem:[\left[1,2\rifht]]. +The previous snippet JSON will generated one normalization Min-Max of the distance function on interval stem:[\[1,2\]]. .Example 3 of DistanceToRange normalisation setup @@ -1210,7 +1208,7 @@ The quadrature order used in the norm computed can be also given if an analytica <11> coordinates of the point <12> fields to be computed at the point coordinate -Here is a xref:toolboxes:csm:rotating-winch/index.adoc[biele example] from the Toolbox examples. +Here is a xref:cases:csm:rotating-winch/index.adoc[biele example] from the Toolbox examples. == The generator of cases by using the index definitions From 33bd6205e20f19653d2d03be9334c0f22ee9bf6d Mon Sep 17 00:00:00 2001 From: Thomas Saigre Date: Mon, 8 Sep 2025 16:18:15 +0200 Subject: [PATCH 8/8] more fixes [ci skip] --- .../ROOT/pages/modeling-analysis-using-json-files.adoc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/toolboxes/modules/ROOT/pages/modeling-analysis-using-json-files.adoc b/toolboxes/modules/ROOT/pages/modeling-analysis-using-json-files.adoc index 18aa760f..7678eb94 100644 --- a/toolboxes/modules/ROOT/pages/modeling-analysis-using-json-files.adoc +++ b/toolboxes/modules/ROOT/pages/modeling-analysis-using-json-files.adoc @@ -359,7 +359,7 @@ We denote by stem:[f] the distance function computed and stem:[g] a normalizatio [stem] ++++ -g(f)=a+\frac{\left(f-min(f)\right)\left(b-a\right)}{max(f)-min(f)} +g(f)=a+\frac{\left(f-\min(f)\right)\left(b-a\right)}{\max(f)-\min(f)} ++++ with reals stem:[a] and stem:[b] (should verify stem:[a_distanceToRange_walls_normalized_min_max`. +* `min_max` method with default range stem:[[0, 1\]] : generated symbol is `meshes__distanceToRange_walls_normalized_min_max`. * `mean` method : generated symbol is `meshes__distanceToRange_walls_normalized_mean`. .Example 2 of DistanceToRange normalisation setup @@ -404,7 +404,7 @@ The previous snippet JSON will generate two normalizations of the distance funct } } ---- -The previous snippet JSON will generated one normalization Min-Max of the distance function on interval stem:[\[1,2\]]. +The previous snippet JSON will generated one normalization Min-Max of the distance function on interval stem:[[1,2\]]. .Example 3 of DistanceToRange normalisation setup