External functions

I tried my hands at external functions and got them to run with extfun_type = 'LINEAR_INTERP_DATA'

However, if I use extfun_type = 'PIECEWISE_CUBIC_POLY', I get the following error:

Index 0 exceeds number of passed external functions

It does actually compute for a while but it terminates with the following error message (in addition to the afore mentioned error):

In function 'IDASolve' of module 'IDAS', error code 'IDA_ILL_INPUT':\nAt t = 3902.5, , mxstep steps taken before reaching tout.\n[Error: integrate::1355] IDASolve returned IDA_TOO_MUCH_WORK at t = 3902.5\n", stderr=b'SOLVER ERROR: Error in IDASolve: IDA_TOO_MUCH_WORK at t = 3902.500000\n

In both cases, I tried to model the same external function:
grad

cadet.root.input.model.external.source_000.extfun_type = 'PIECEWISE_CUBIC_POLY'
cadet.root.input.model.external.source_000.const_coeff = [1, 1, 0.5]
cadet.root.input.model.external.source_000.lin_coeff = [0, -1/8000, 0]
cadet.root.input.model.external.source_000.quad_coeff = [0, 0, 0]
cadet.root.input.model.external.source_000.cube_coeff = [0, 0, 0]
cadet.root.input.model.external.source_000.section_times = [0, 4000, 8000, 12000]
cadet.root.input.model.external.source_000.velocity = 0.01

cadet.root.input.model.external.source_000.extfun_type = 'LINEAR_INTERP_DATA'
cadet.root.input.model.external.source_000.time = [0, 4000, 8000, 12000]
cadet.root.input.model.external.source_000.data = [1, 1, 0.5, 0.5]
cadet.root.input.model.external.source_000.velocity = 0.01

See also here.

external.h5 (148.5 KB)

Thanks for reporting. I filed an issue on your behalf.
The problem was fixed in commit 4e02ed7.

1 Like