60 TYPE(t_region
) :: region
62 INTEGER :: injcdiamdist
63 REAL(RFREAL) :: diam, spload
68 CHARACTER(CHRLEN) :: rcsidentstring
70 REAL(RFREAL) :: diammeanlog, injcdiammean, injcstddev
71 REAL(RFREAL) ::
alpha, diampeaklog, injcdiammax, injcdiammin, &
72 injcdiampeak, power,valmax
77 REAL(RFREAL),
POINTER :: pdfvalues(:,:)
81 rcsidentstring =
'$RCSfile: PLAG_InjcMakeParticle.F90,v $ $Revision: 1.5 $'
83 global => region%global
86 'PLAG_InjcMakeParticle.F90' )
90 SELECT CASE(injcdiamdist)
94 CASE (plag_injc_lognorm)
95 injcdiammean = region%plagInput%injcDiamMean
96 injcstddev = region%plagInput%injcStdDev
98 diammeanlog = log(injcdiammean)
100 spload = region%plagInput%spLoad
104 CASE (plag_injc_logskwd)
105 injcdiampeak = region%plagInput%injcDiamMean
106 injcdiammin = region%plagInput%injcDiamMin
107 injcdiammax = region%plagInput%injcDiamMax
108 injcstddev = region%plagInput%injcStdDev
111 diampeaklog = log(injcdiampeak)
113 alpha = diampeaklog + injcstddev*injcstddev*power/ &
114 ( (injcdiammax/injcdiampeak)**power - 1.0_rfreal)
117 injcdiammax,
alpha, power, region%randData )
118 spload = region%plagInput%spLoad
121 pdfvalues => region%plagInput%PDF%pdfvalues
122 locmaxpdf = region%plagInput%PDF%locMax
123 valmax = region%plagInput%PDF%valMax
126 spload = region%plagInput%spLoad
129 CALL
errorstop( global,err_reached_default,__line__ )
151 REAL(RFREAL),
INTENT(IN) :: dmax,dpeak,dmin,sdev,
alpha,power
154 INTEGER,
PARAMETER :: itermax = 1000
157 REAL(RFREAL) :: dlognorm, fskewedratio, xdistrand
164 IF ( dlognorm >= dmin .AND. dlognorm <= dmax )
THEN
167 fskewedratio = 1.0_rfreal - ( (1.0_rfreal-(dlognorm/dmax)**power) &
168 * (1.0_rfreal-(dmin/dlognorm)**power) )
169 IF ( xdistrand > fskewedratio )
THEN
178 WRITE(stdout,
'(A)') solver_name//
'### WARNING: PLAG_rand1LogSkewed failed!'
179 WRITE(stdout,
'(A)') solver_name//
'### Setting random value to peak'
REAL(RFREAL) function rand1imposedpdf(rdata, pdfvalues, locMax, valmax)
subroutine registerfunction(global, funName, fileName)
subroutine plag_injcmakeparticle(region, injcDiamDist, diam, spLoad)
REAL(RFREAL) function rand1uniform(rdata)
REAL(RFREAL) function plag_rand1logskewed(dPeak, sDev, dMin, dMax, alpha, power, rdata)
subroutine errorstop(global, errorCode, errorLine, addMessage)
unsigned char alpha() const
subroutine deregisterfunction(global)
REAL(RFREAL) function rand1lognormal(logmed, gdev, rdata)