Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
" L_{residual} = \\int_1^2 \\int_0^l \\left( \\frac{\\mathrm{d}^2 u_{net}}{\\mathrm{d} x^2}(x,l) - f(x) \\right)^2 dx dl \\approx \\left(\\int_1^2 \\int^l_0 dxdl\\right) \\frac{1}{N} \\sum^{N}_{i=0} \\left(\\frac{\\mathrm{d}^2 u_{net}}{\\mathrm{d} x^2}(x_i, l_i) - f(x_i)\\right)^2\n",
"\\end{equation}\n",
"\\begin{equation}\n",
" L_{BC} = \\int_1^2 (u_{net}(0,l))^2 + (u_{net}(l,l) dl \\approx \\left(\\int_1^2 dl\\right) \\frac{1}{N} \\sum^{N}_{i=0} (u_{net}(0, l_i))^2 + (u_{net}(l_i, l_i))^2\n",
" L_{BC} = \\int_1^2 (u_{net}(0,l))^2 + (u_{net}(l,l))^2 dl \\approx \\left(\\int_1^2 dl\\right) \\frac{1}{N} \\sum^{N}_{i=0} (u_{net}(0, l_i))^2 + (u_{net}(l_i, l_i))^2\n",
"\\end{equation}\n",
"In the figure below, we see the solution to the differential equation for various $l$ values after optimizing the network on this loss. While this example problem is overly simplistic, the ability to solve parameterized geometries presents significant industrial value. Instead of performing a single simulation, we can solve multiple designs simultaneously for reduced computational cost. More examples of this can be found in <a href=\"https://docs.nvidia.com/deeplearning/modulus/index.html\" rel=\"nofollow\">Modulus User Documentation</a>.\n",
"<center><img src=\"images/every_parabola.png\" alt=\"Drawing\" style=\"width:500px\" /></center>\n"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"\n",
"#### Navier-Stokes Equation \n",
" \n",
"The Navier-Stokes equations consist of a time-dependent continuity equation for the conservation of mass, three time-dependent conservation of momentum equations and a time-dependent conservation of energy equation. There are four independent variables in the problem, the $x, y, and z$ spatial coordinates of some domain, and the time $t$. There are six dependent variables; the pressure $p$, density $r$, and temperature $T$, and three components of the velocity vector; the $u$ component is in the $x$ direction, the $v$ component is in the $y$ direction, and the $w$ component is in the $z$ direction, All of the dependent variables are functions of all four independent variables.\n",
"The Navier-Stokes equations consist of a time-dependent continuity equation for the conservation of mass, three time-dependent conservation of momentum equations and a time-dependent conservation of energy equation. There are four independent variables in the problem, the $x$, $y$, and $z$ spatial coordinates of some domain, and the time $t$. There are six dependent variables; the pressure $p$, density $r$, and temperature $T$, and three components of the velocity vector; the $u$ component is in the $x$ direction, the $v$ component is in the $y$ direction, and the $w$ component is in the $z$ direction, All of the dependent variables are functions of all four independent variables.\n",
" \n",
"\n",
"\\begin{equation}\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"### Step 3: Setting up the Domain,a ssigning the boundary and PDE constraints\n",
"### Step 3: Setting up the Domain, assigning the boundary and PDE constraints\n",
"\n",
"As described earlier, we need to define a domain for training our neural network. The `Domain` and the configs are passed as inputs when using the `Solver` class. Apart from constraints, you can add various other utilities to the `Domain` such as monitors, validation data, points to do inference on, etc. "
]
Expand All @@ -252,7 +252,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Now let’s look into adding constraints to this domain. This can be thought of as adding specific constraints to the neural network optimization. For this physics-driven problem, these constraints are the boundary conditions and equation residuals. The goal is to satisfy the boundary conditions exactly and ideally have the PDE residuals go to 0. These constraints can be specified within Modulus using classes like `PointwiseBoundaryConstrant` and `PointwiseInteriorConstraint`. An L2 loss (default and can be modified) is then constructed from these constraints, which is used by the optimizer to minimize on.\n",
"Now let’s look into adding constraints to this domain. This can be thought of as adding specific constraints to the neural network optimization. For this physics-driven problem, these constraints are the boundary conditions and equation residuals. The goal is to satisfy the boundary conditions exactly and ideally have the PDE residuals go to 0. These constraints can be specified within Modulus using classes like `PointwiseBoundaryConstraint` and `PointwiseInteriorConstraint`. An L2 loss (default and can be modified) is then constructed from these constraints, which is used by the optimizer to minimize on.\n",
"\n",
"$$L = L_{BC} + L_{Residual}$$\n",
"<strong>Boundary constraints:</strong> For generating a boundary condition, we need to sample the points on the required boundary/surface of the geometry, specify the nodes we would like to unroll/evaluate on these points and then assign them the desired values. \n",
Expand All @@ -274,7 +274,7 @@
"```python\n",
" #Add Constraints to solver\n",
" v_o = 40.0 # Initial velocity\n",
" theta = np.pi/3 # Initial anagle \n",
" theta = np.pi/3 # Initial angle \n",
" time_range = {t :(0.0,5.0)} # Time range to solve the PDE\n",
"\n",
" # Initial condition\n",
Expand Down