program iv_curve_azur_full
implicit none
! Declaracion de variables
real(8) :: Isc_ref, Voc_ref, Isc_t, Voc_t
real(8) :: IL, I0, Rs, a_ref, a, Voc_estimado
real(8) :: V, I, I_next, f, df, tol
real(8) :: P, P_max, V_mpp_calc, I_mpp_calc
real(8) :: T_ref, T_op, delta_T, alpha, beta
real(8) :: X_ref, X_op, G_ref, G_op
integer :: step, iter, max_iter, num_steps
! Valores de referencia AZUR 3C44A a X500
X_ref = 500.0d0
G_ref = 1000.0d0 ! Radiacion de referencia (W/m2)
Isc_ref = 7.66d0
Voc_ref = 3.11d0
! Coeficientes de temperatura
alpha = 0.0061d0 ! A/K
beta = -0.0042d0 ! V/K
! --- PARAMETROS DE OPERACION A SIMULAR ---
T_op = 25.0d0 + 273.15d0 !80 ! Temperatura de operacion (K)
X_op = 500.0d0 !1000 ! Concentracion optica (Soles)
G_op = 1000.0d0 !850 ! Radiacion solar real DNI (W/m2)
! -----------------------------------------
T_ref = 25.0d0 + 273.15d0
delta_T = T_op - T_ref
! 1. Ajuste termico bajo condiciones de referencia
Isc_t = Isc_ref + alpha * delta_T
Voc_t = Voc_ref + beta * delta_T
a_ref = 0.042d0
a = a_ref * (T_op / T_ref)
! 2. Calculo de I0 (Depende de T, NO de luz)
I0 = Isc_t * exp(-Voc_t / a)
! 3. Ajuste por Concentracion (X) e Irradiancia (G)
IL = Isc_t * (X_op / X_ref) * (G_op / G_ref)
Voc_estimado = Voc_t + a * log((X_op * G_op) / (X_ref * G_ref))
Rs = 0.016d0
! Configuracion del metodo numerico
tol = 1.0d-7
max_iter = 100
num_steps = 100
P_max = 0.0d0
! Imprimir encabezado
print *, 'Simulacion CPV Completa:'
print *, 'Temperatura (C) : ', T_op - 273.15d0
print *, 'Concentracion (X): ', X_op
print *, 'Irradiancia (G) : ', G_op, ' W/m2'
print *, ' '
print *, 'Voltaje(V) Corriente(A) Potencia(W)'
print *, '-----------------------------------------'
! Barrido de Voltaje hasta el Voc_estimado
do step = 0, num_steps
V = (dble(step) / dble(num_steps)) * Voc_estimado
I = IL
do iter = 1, max_iter
f = I - IL + I0 * (exp((V + I * Rs) / a) - 1.0d0)
df = 1.0d0 + I0 * (Rs / a) * exp((V + I * Rs) / a)
I_next = I - f / df
if (abs(I_next - I) < tol) exit
I = I_next
end do
if (I < 0.0d0) I = 0.0d0
P = V * I
if (P > P_max) then
P_max = P
V_mpp_calc = V
I_mpp_calc = I
end if
print '(F8.4, 4X, F8.4, 4X, F8.4)', V, I, P
end do
print *, '-----------------------------------------'
print *, '--- MPP Calculado ---'
print '(A, F8.4, A)', 'V_mpp : ', V_mpp_calc, ' V'
print '(A, F8.4, A)', 'I_mpp : ', I_mpp_calc, ' A'
print '(A, F8.4, A)', 'P_max : ', P_max, ' W'
end program iv_curve_azur_full
To embed this project on your website, copy the following code and paste it into your website's HTML: