Call a function in OpenFOAM

34 Views Asked by At

I had a question, I'm sure it's related to knowledge of C++, but I confess that I didn't understand how in the same equation, the value of Y is called in two ways, one time as y_ and the other as y_() (SpalartAllmarasDDES.C - OpenFOAM-9). Is there a difference between them or was there some detail that went unnoticed by the programmer?

Thanks

template<class BasicMomentumTransportModel>
tmp<volScalarField::Internal>
SpalartAllmarasDDES<BasicMomentumTransportModel>::dTilda
(
    const volScalarField::Internal& chi,
    const volScalarField::Internal& fv1,
    const volTensorField::Internal& gradU
) const
{
    return volScalarField::Internal::New
    (
        modelName("dTilda"),
        max
        (
            this->y_
          - fd(mag(gradU))
           *max
            (
                this->y_() - this->CDES_*this->delta()(),
                dimensionedScalar(dimLength, 0)
            ),
            dimensionedScalar(dimLength, small)
        )
    );
}
0

There are 0 best solutions below