ABI-Software / abics

ABI comfort simulator.
4 stars 3 forks source link

Dividing by zero error for thickness #2

Open tjunwei opened 2 years ago

tjunwei commented 2 years ago

When running the 65-node model with clothing, there seems to be an error:

RuntimeWarning: divide by zero encountered in double_scalars ral = 1.0/(self.hr+self.k/thickness[i])*radius[0]/radius[i-1]

        for i in range(1,radius.shape[0]):
            ral = 1.0/(self.hr+self.k/thickness[i])*radius[0]/radius[i-1]
            rf  = resistance[i]*radius[0]/radius[i]
            rt = rt + ral + rf

The link to the code is found https://github.com/ABI-Software/abics/blob/f32f1f63f6378863c123ccf86be8db822df77fb5/support/EffectiveResistances.py#L115

For skin layer = 0, thickness is pre-set as 0 mm which would lead to the divide by zero error. May I know where is the formula for rea, rf and rt derived form?

Environment: Windows 10 Python 3.9.6 Conda 4.10.1

oylinv commented 2 years ago

兄弟你也做热舒适的?我也是,留个联系方式交流交流?oylinv@gmail.com