deepflame-dev icon indicating copy to clipboard operation
deepflame-dev copied to clipboard

dfLowMachFoam doesn't support `inletOutlet` or `totalTemperature` boundary condition for the `T` field

Open TimoLin opened this issue 4 months ago • 0 comments

Releated code:

https://github.com/deepmodeling/deepflame-dev/blob/1be82b637cd03ddcdbff61a140385c8a824a5ee2/applications/solvers/dfLowMachFoam/createFields.H#L14-L18

Bug description

  1. For inletOutlet boundary condition, needs phi field to determine the flow direction. While the phi is not yet created before calling T.correctBoundaryConditions(); .

  2. For totalTemperature boundary condition, the U field is needed, which is not yet created in here. $ T_p = \frac{T_0}{1 + \frac{\gamma - 1}{2 \gamma} \psi \mag{\u}^2} $

Error message:

--> FOAM FATAL ERROR:

    request for volVectorField U from objectRegistry region0 failed
    available objects of type volVectorField are
0()

    From function const Type& Foam::objectRegistry::lookupObject(const Foam::word&) const [with Type = Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>]
    in file /opt/openfoam7/src/OpenFOAM/lnInclude/objectRegistryTemplates.C at line 193.

FOAM aborting

#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::error::abort() at ??:?
#2  Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const& Foam::objectRegistry::lookupObject<Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> >(Foam::word const&) const in "/home/zt/OpenFOAM/deepflame-dev/platforms/linux64GccDPInt32Opt/bin/dfLowMachFoam"
#3  Foam::totalTemperatureFvPatchScalarField::updateCoeffs() at ??:?
#4  Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::Boundary::evaluate() in "/home/zt/OpenFOAM/deepflame-dev/platforms/linux64GccDPInt32Opt/bin/dfLowMachFoam"
#5  ? in "/home/zt/OpenFOAM/deepflame-dev/platforms/linux64GccDPInt32Opt/bin/dfLowMachFoam"
#6  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#7  ? in **"/home/zt/OpenFOAM/deepflame-dev/platforms/linux64GccDPInt32Opt/bin/dfLowMachFoam"**

TimoLin avatar Sep 04 '25 07:09 TimoLin