@@ -207,7 +207,8 @@ <h1>Creeping Flow in a <span class="accent">2D Lid-Driven Cavity Tutorial</span>
207207 \(\nabla \cdot \mathbf{u} = 0\) and \(-\mu \nabla^{2} \mathbf{u} + \nabla p = \mathbf{0}\),
208208 where \(\mathbf{u} = (u,v)\) is the velocity vector, \(p\) is the pressure and \(\mu\) is the
209209 dynamic viscosity. In the FEAScript implementation below, we set the viscosity coefficient to
210- \(\mu = 1.0\).
210+ \(\mu = 1.0\) with the < code > viscosity</ code > coefficient of the model (a number, or a function of
211+ \(x\) and \(y\) for a varying viscosity).
211212 </ p >
212213
213214 < div class ="center-image ">
@@ -260,7 +261,11 @@ <h1>Creeping Flow in a <span class="accent">2D Lid-Driven Cavity Tutorial</span>
260261
261262 // 1. Create the model and select the physics
262263 const model = new FEAScriptModel();
263- model.setModelConfig("creepingFlowScript");
264+ model.setModelConfig("creepingFlowScript", {
265+ coefficientFunctions: {
266+ viscosity: 1, // μ
267+ },
268+ });
264269
265270 // 2. Define the mesh (creeping flow needs quadratic elements)
266271 model.setMeshConfig({
@@ -368,7 +373,11 @@ <h1>Creeping Flow in a <span class="accent">2D Lid-Driven Cavity Tutorial</span>
368373 const model = new FEAScriptModel ( ) ;
369374
370375 // Set model configuration
371- model . setModelConfig ( "creepingFlowScript" ) ;
376+ model . setModelConfig ( "creepingFlowScript" , {
377+ coefficientFunctions : {
378+ viscosity : 1 , // μ
379+ } ,
380+ } ) ;
372381
373382 // Define mesh configuration
374383 model . setMeshConfig ( {
0 commit comments