JieSun-pku / detonationFoam

detonationFoam: An open-source solver for simulation of gaseous detonation based on OpenFOAM.
GNU General Public License v3.0
39 stars 12 forks source link

Getting the following error in a newer OpenFOAM version (OFv2406) #6

Open milin333martin opened 3 days ago

milin333martin commented 3 days ago

The make process of the solver went pretty smoothly. On running the test case of 1D detonation, I encounter the following error:

// * // Create time

Create mesh for time = 0

Reading thermophysical properties

Selecting thermodynamics package { type hePsiThermo; mixture pureMixture; transport const; thermo hConst; equationOfState perfectGas; specie specie; energy sensibleInternalEnergy; }

Reading field U

Creating turbulence model

Selecting turbulence model type laminar Selecting laminar stress model Stokes Creating field kinetic energy K

Selecting fluxScheme: HLLC

Starting time loop

--> FOAM FATAL ERROR: (openfoam-2406) Operator + : undefined for oriented and unoriented types

From bool Foam::checkTypes(const char*, const Foam::orientedType&, const Foam::orientedType&)
in file orientedType/orientedType.C at line 86.

FOAM aborting

I am unable to spot where the error is located. But I realise between the new version, there is something regarding the way in which after fluxes are computed there is something to do with orientation. Do you know a fix to this problem?

milin333martin commented 3 days ago

I found that the solution is adding :

cSf_pos.setOriented(); cSf_neg.setOriented();

in the createDT.H. Not sure how this works. If you find the reason please do post it :)