Skip to content

REF_AREA=0 causes immediate divergence when totalpositivearea=0 #2435

Open
@bigfooted

Description

@bigfooted

Describe the bug
From cfd-online:
https://www.cfd-online.com/Forums/su2/259230-nan-error-before-iterations-begin-3d-su2.html#post879476
"I found the problem. The setting of REF_AREA = 0, which worked in the Turbulent ONERA M6 tutorial and I understand is supposed to imply an automatic calculation, in this case caused the error. "

REF_AREA=0 triggers a recomputation of the area, in CPhysicalGeometry::SetPositive_ZArea :

 if (config->GetRefArea() == 0.0) {
    if (D3)
      config->SetRefArea(TotalPositiveZArea);
    else
      config->SetRefArea(TotalPositiveYArea);

This does not work if the totalpositivearea is zero (I think this is the reason of immediate divergence in this case). We should warn the user that this is the case, and stop with an error message

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions