resetBoundaries.H 802 Bytes
Newer Older
shunbo's avatar
shunbo committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
{
    // Keep standard formulation on domain boundaries to ensure compatibility
    // with existing boundary conditions
    const Foam::FieldField<Foam::fvsPatchField, scalar> rhorAUf_orig
    (
        fvc::interpolate(rho.boundaryField()*rAU.boundaryField())
    );

    const Foam::FieldField<Foam::fvsPatchField, vector> rhoHbyA_orig
    (
        fvc::interpolate(rho.boundaryField()*HbyA.boundaryField())
    );

    surfaceScalarField::Boundary& rhorAUfbf = rhorAUf.boundaryFieldRef();
    surfaceVectorField::Boundary& rhoHbyAfbf = rhoHbyAf.boundaryFieldRef();

    forAll(U.boundaryField(), patchi)
    {
        if (!U.boundaryField()[patchi].coupled())
        {
            rhorAUfbf[patchi] = rhorAUf_orig[patchi];
            rhoHbyAfbf[patchi] = rhoHbyA_orig[patchi];
        }
    }
}