[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[TRNSYS-users] Question regarding dynamic array values



Hi,

 

I use some dynamic arrays within the code for a log boiler. The initial value is 0.

The use of the dynamic arrays is an endtime for one of five phases. This time changes the longer the simulation runs:
t_A = time + dt_A – set every time the boiler starts the burning cycle.

T_A is then stored in the dynamic array.

 

This works fine later in the simulation, but doesn’t in the beginning.

For some reason I can’t overwrite t_A after its initially read from the stored dynamic array, which is 0 initially.

The test_number will be set to 12, but t_A will stay 0, even if I change it to t_A = 15 or so.

 

!--Calculation of time parameter----------------------------------------------------------------------------------------------- -

    if ((opphpr==0).and.(Opph==1)) Then

        test_number = 12.

        t_0 = time                          ! set end timestpemps for the 5 phases

        t_A = time + dt_A

        t_B = time + dt_A + dt_B

        t_C = time + dt_A + dt_B + dt_C1

        t_D = time + dt_A + dt_B + dt_C1 + dt_D

        t_E = time + dt_A + dt_B + dt_C1 + dt_D + dt_E

    Endif

 

I’d be glad if someone could help me out.

Best regards,
Jan