@@ -88,17 +88,17 @@ <h2 id="mathematicalformulation"><a name="Mathematical formulation"></a>Mathemat
8888 where particles, energy, or other physical quantities are transferred inside a physical system due to
8989 two processes: diffusion and advection. In one dimension, the steady-state equation is given by:
9090 </ p >
91- < p > \(\frac{d^2u}{dx^2} + 10 \frac{du}{dx} = - 10 \cdot e^{-200 \cdot (x - 0.5)^2}\)</ p >
91+ < p > \(\frac{d^2u}{dx^2} - 10 \frac{du}{dx} = 10 \cdot e^{-200 \cdot (x - 0.5)^2}\)</ p >
9292 < p >
9393 This can be rewritten in the general form: \(\frac{d}{dx}\left(A(x)\frac{du}{dx}\right) +
9494 B(x)\frac{du}{dx} + C(x)u = D(x)\)
9595 </ p >
9696 < p > Where for our specific problem:</ p >
9797 < ul >
9898 < li > \(A(x) = 1\) (diffusion coefficient)</ li >
99- < li > \(B(x) = 10\) (advection coefficient)</ li >
99+ < li > \(B(x) = - 10\) (advection coefficient)</ li >
100100 < li > \(C(x) = 0\) (no reaction term)</ li >
101- < li > \(D(x) = - 10 \cdot e^{-200 \cdot (x - 0.5)^2}\) (Gaussian source term centered at x = 0.5)</ li >
101+ < li > \(D(x) = 10 \cdot e^{-200 \cdot (x - 0.5)^2}\) (Gaussian source term centered at x = 0.5)</ li >
102102 </ ul >
103103
104104 < p >
@@ -144,11 +144,11 @@ <h2 id="solvingwithfeascript"><a name="Solving with FEAScript"></a>Solving with
144144 // Set solver configuration with coefficient functions
145145 model.setSolverConfig("generalFormPDEScript", {
146146 coefficientFunctions: {
147- // Equation d²u/dx² + 10 du/dx = - 10 * exp(-200 * (x - 0.5)²)
147+ // Equation d²u/dx² - 10 du/dx = 10 * exp(-200 * (x - 0.5)²)
148148 A: (x) => 1, // Diffusion coefficient
149- B: (x) => 10, // Advection coefficient
149+ B: (x) => - 10, // Advection coefficient
150150 C: (x) => 0, // Reaction coefficient
151- D: (x) => - 10 * Math.exp(-200 * Math.pow(x - 0.5, 2)), // Source term
151+ D: (x) => 10 * Math.exp(-200 * Math.pow(x - 0.5, 2)), // Source term
152152 },
153153 });
154154
@@ -254,11 +254,11 @@ <h2 id="results"><a name="Results"></a>Results</h2>
254254 // Set solver configuration with coefficient functions
255255 model . setSolverConfig ( "generalFormPDEScript" , {
256256 coefficientFunctions : {
257- // Equation d²u/dx² + 10 du/dx = - 10 * exp(-200 * (x - 0.5)²)
257+ // Equation d²u/dx² - 10 du/dx = 10 * exp(-200 * (x - 0.5)²)
258258 A : ( x ) => 1 , // Diffusion coefficient
259- B : ( x ) => 10 , // Advection coefficient
259+ B : ( x ) => - 10 , // Advection coefficient
260260 C : ( x ) => 0 , // Reaction coefficient
261- D : ( x ) => - 10 * Math . exp ( - 200 * Math . pow ( x - 0.5 , 2 ) ) , // Source term
261+ D : ( x ) => 10 * Math . exp ( - 200 * Math . pow ( x - 0.5 , 2 ) ) , // Source term
262262 } ,
263263 } ) ;
264264
0 commit comments