FiniteVolumeTransportPhenomena / PyFVTool

Finite volume toolbox in Python
GNU Lesser General Public License v2.1
13 stars 4 forks source link

'test_benchmark_1d.py' fails #17

Closed mhvwerts closed 10 months ago

mhvwerts commented 1 year ago

When running pytest, the following unittest fails: tests/test_benchmark_1d.py

It fails in the following manner:

================================================= FAILURES =================================================
____________________________________ TestConvection.test_1d_convection _____________________________________

self = <tests.test_benchmark_1d.TestConvection testMethod=test_1d_convection>

    def test_1d_convection(self):
        print("\nRunning 1D convection:")
        er = conv_numerical_1d()
        eps_c = 0.001
>       self.assertLessEqual(er, eps_c)
E       AssertionError: 0.08326582704284138 not less than or equal to 0.001

tests\test_benchmark_1d.py:115: AssertionError
simulkade commented 1 year ago

I will have a look. I guess the calculated error needs to be divided by the number of cells, that is still not enough for the numeric model to pass the test.

mhvwerts commented 10 months ago

I was able to fix the test by

  1. dividing the absolute error by the number of cells
  2. and increasing the number of FV cells from 25 to 50