Openfoam代码修改
-
之前每个场的Dc值一样,这里我想设置每一个field的Dc值不一样,求问一下这里代码怎么修改一下:
{ surfaceScalarField phichems( phi*1.0 ); forAll(fluidPhase.field, i) { fvScalarMatrix chemTransportEqn ( fvm::ddt(fluidPhase.field[i]) + fvm::div(phichems,fluidPhase.field[i],"div(phi,chems)") - fvm::laplacian(Dc,fluidPhase.field[i]) //想修改这一行的Dc ); chemTransportEqn.relax(); chemTransportEqn.solve(); fluidPhase.field[i].correctBoundaryConditions(); } }