module: trline_vstep
parameters: double vend double vstart double tstep double zo double zor
inputs: double outr double outr_p  
outputs:  double out
classes: 
static_variables: double i
init: 
if (zor <= 0.0 || zo < 0.0)
  {
   printf("error in 'trline_vstep': zor must be > 0.0 and zo >= 0.0\n");
   printf("  in this case, zor = %5.3e, zo = %5.3e\n",zor,zo);
   exit(1);  
  } 
i=0.0;
out = zor/(zor+zo)*vstart;
code:
i += 1.0;
out = zor/(zor+zo)*(i*Ts >= tstep ? vend : vstart);
out += (zo-zor)/(zo+zor)*outr_p;
