firemodels / fds

Fire Dynamics Simulator
https://pages.nist.gov/fds-smv/
Other
634 stars 611 forks source link

Example in User's Guide failed #11056

Closed herbertTau closed 1 year ago

herbertTau commented 1 year ago

I defined a species mixture according to "Example 2: Defining a background species" in para. 14.2 and added the line as shown at the end of para. 14.2.

This will result in an error (see attachement).

air_specie.fds.txt log.txt

rmcdermo commented 1 year ago

Thanks for the report. I'm seeing the same.

rmcdermo commented 1 year ago

@drjfloyd I've tracked this down to fact that in this code block we have NNN=3 when N_TRACKED_SPECIES=2. This is at about Line 2980 in read.f90. If I put any print statement in the code seg faults on the line SPECIES_MIXTURE(NNN) = SPECIES_MIXTURE(N).

TRACKED_SPEC_LOOP_3: DO NN = 1, N_COPY
   FIND_TRACKED_2: DO
      CALL SET_SPEC_DEFAULT
      READ(LU_INPUT,NML=SPEC)
      IF (.NOT. COPY_LUMPED) CYCLE FIND_TRACKED_2
      DO N=1,NNN-1
         IF (SPECIES_MIXTURE(N)%ID==SPEC_ID(1)) THEN
            print *,NNN,N,N_TRACKED_SPECIES
            SPECIES_MIXTURE(NNN) = SPECIES_MIXTURE(N)
            SPECIES_MIXTURE(NNN)%ID = ID
            EXIT FIND_TRACKED_2
drjfloyd commented 1 year ago

Have to rethink the logic here. It is pretty contorted trying to deal with predefined species for simple chemistry, agglomeration, condensation, and copies. In the meantime you can just explicitly defined AIR2:

&SPEC ID='AIR2', SPEC_ID(1)='NITROGEN', MASS_FRACTION(1)=0.76274 SPEC_ID(2)='OXYGEN', MASS_FRACTION(2)=0.23054 SPEC_ID(3)='WATER VAPOR', MASS_FRACTION(3)=0.00626 SPEC_ID(4)='CARBON DIOXIDE',MASS_FRACTION(4)=0.00046 /

drjfloyd commented 1 year ago

Will fix this as part of the update for adding multiple simple chemistry reactions I am already working on.

drjfloyd commented 1 year ago

Case is now working with current source. From the .out file:

Tracked (Lumped) Species Information

AIR Molecular Weight (g/mol) 28.74367 Ambient Density (kg/m^3) 1.195 Initial Mass Fraction 1.000 Enthalpy of Formation (J/kg) -8.81E+04

Sub Species Mass Fraction Mole Fraction NITROGEN 7.627400E-01 7.826237E-01 OXYGEN 2.305400E-01 2.070880E-01 WATER VAPOR 6.260000E-03 9.987932E-03 CARBON DIOXIDE 4.600000E-04 3.004372E-04

 Viscosity (kg/m/s) Ambient,  293 K:  1.80E-05
                              500 K:  2.61E-05
                             1000 K:  4.12E-05
                             1500 K:  5.37E-05

Therm. Cond. (W/m/K) Ambient, 293 K: 2.56E-02 500 K: 3.81E-02 1000 K: 6.69E-02 1500 K: 9.25E-02 Enthalpy (J/kg) Ambient, 293 K: -9.32E+04 500 K: 1.19E+05 1000 K: 6.69E+05 1500 K: 1.27E+06 Spec. Heat (J/kg/K) Ambient, 293 K: 1.02E+03 500 K: 1.04E+03 1000 K: 1.16E+03 1500 K: 1.23E+03 Diff. Coeff. (m^2/s) Ambient, 293 K: 1.99E-05 500 K: 4.96E-05 1000 K: 1.58E-04 1500 K: 3.10E-04

AIR2 Molecular Weight (g/mol) 28.74367 Ambient Density (kg/m^3) 1.195 Initial Mass Fraction 0.000 Enthalpy of Formation (J/kg) -8.81E+04

Sub Species Mass Fraction Mole Fraction NITROGEN 7.627400E-01 7.826237E-01 OXYGEN 2.305400E-01 2.070880E-01 WATER VAPOR 6.260000E-03 9.987932E-03 CARBON DIOXIDE 4.600000E-04 3.004372E-04

 Viscosity (kg/m/s) Ambient,  293 K:  1.80E-05
                              500 K:  2.61E-05
                             1000 K:  4.12E-05
                             1500 K:  5.37E-05

Therm. Cond. (W/m/K) Ambient, 293 K: 2.56E-02 500 K: 3.81E-02 1000 K: 6.69E-02 1500 K: 9.25E-02 Enthalpy (J/kg) Ambient, 293 K: -9.32E+04 500 K: 1.19E+05 1000 K: 6.69E+05 1500 K: 1.27E+06 Spec. Heat (J/kg/K) Ambient, 293 K: 1.02E+03 500 K: 1.04E+03 1000 K: 1.16E+03 1500 K: 1.23E+03 Diff. Coeff. (m^2/s) Ambient, 293 K: 1.99E-05 500 K: 4.96E-05 1000 K: 1.58E-04 1500 K: 3.10E-04