C FHARDCC   SOURCE    PV        21/12/18    07:15:03     11240          
      FUNCTION fhardCC(rkappac,fc,fc0,rkappa1,ac,bc,lerror)

c     hardening in effective stress!
c     strain hardening inspired from concrete ETC curve in uniaxial compression
c     for the ascending branch, i.e. until peak stress and peak stress strain
c     then the descending branch is an exponential

c     Elastic from (0;0) to (0;fc0)
c     The curve begins on (0;fc0),
c       then ascending branch based on ETC until peak
c       then descending branch exponential
c       and at the junction, the tangent is horizontal

      IMPLICIT REAL*8 (A-B,D-H,O-Z)
      implicit integer (I-K,M,N)
      implicit logical (L)
      implicit character*10 (C)

      hc = bc

      if (rkappac.le.rkappa1) then
        rn = (rkappac/rkappa1)
        rloc = 2.*(fc-fc0)*rn/(1.+(rn*rn))
        ry = (EXP(ac*rkappac))*(fc0+rloc)
      else
        rloc = (1. + hc*(rkappac-rkappa1)) *
     .   (EXP(-bc*(rkappac-rkappa1)))
        ry = (EXP(ac*rkappac))*fc*rloc
      endif

      if (ABS(ry).gt.10.E+25) then
        lerror = .true.
        fhardcc=ry
        return
      endif

      fhardCC= ry

      RETURN
      END




 
