4 volScalarField& C = *CPtr;
6 const dimensionedScalar& D
7 = interface.surfactant().surfactBulkDiffusion();
9 scalar ka = interface.surfactant().surfactAdsorptionCoeff().value();
10 scalar kb = interface.surfactant().surfactDesorptionCoeff().value();
11 scalar CsInf = interface.surfactant().surfactSaturatedConc().value();
14 interface.surfactantConcentration().internalField();
17 C.boundaryField()[interface.aPatchID()].patchInternalField();
19 const scalarField& Cfs = C.boundaryField()[interface.aPatchID()];
21 scalarField dn = 1.0/mesh.boundary()[interface.aPatchID()].deltaCoeffs();
25 C.boundaryField()[interface.aPatchID()].type()
26 == fixedGradientFvPatchScalarField::typeName
29 fixedGradientFvPatchScalarField& CA =
30 refCast<fixedGradientFvPatchScalarField>
32 C.boundaryField()[interface.aPatchID()]
35 CA.gradient() = (ka*kb*Cs - ka*(CsInf-Cs)*Cfs)/D.value();
39 FatalErrorIn(args.executable())
40 << "Bulk concentration boundary condition "
41 << "at the freeSurface patch is not "
42 << fixedGradientFvPatchScalarField::typeName
49 + fvm::div(phi - fvc::meshPhi(rho,U), C, "div(phi,C)")
50 - fvm::laplacian(D, C, "laplacian(D,C)")
53 CP = C.boundaryField()[interface.aPatchID()].patchInternalField();
55 // Info << gMax(CP) << ", "<< gAverage(CP) << endl;