[en] By 2050 the energy consumption is expected to increase considerably.The production might be mostly based on renewable energy mix driven by the nuclear fusion which could potentially deliver continuous, large-scale power for the long-term without harming the environment. Regrettably, the nuclear fusion still requires numerous developments, which are undergoing around the word, to prove the design feasibility and to evaluate the safety relatad aspects which are to sorne extent embraced this thesis. In light of this, during the last ten years the Nuclear Engineering Research Group (NERG-UPC) has being developing a safety code callad AJNA (acron of Analyses of IN-vessel Accidents) to evaluate the magnetic fusion reactor plasma-wall transients in case of ex-vessel LOCA and overfuelling , determining thermal wall profiles as well as checking the integrity of in-vessel components (melting). Considering the e'v'Olution of technologies and related methodologies, a substantial renewal/improvement plan for AJNA were established. Two specific development tasks are part of this PhD thesis. (i) The definition, standardization and validation of an enhanced methodology to develop new AJNA versions in order to obtain robust models, estimating as accurately as possible the behaviour of the studied systems. (ii) The re-design, generalization and optimization of thermal-hydraulics routines for the determination of the AJNA thermal-wall distributions both in normal and accident scenarios in substitution of the former unverified/unqualified ones. In addition, the thermal­ hydraulic routines have been validated against commercial software as ANSYS Fluent. Consequently, the code has been almost rewritten, improved and consolidated giving special attention on document, comment and V&Vaccording to the current software standard requirements . lndeed, severa! novel features have been introduced to extend the modelling capacity of the AJNA application solver and to estimate the errors . Afterward, two specific AJNA blanket thermal-wall models have been developed: the Water Cooled Pebble Sed JAPANESE­ DEMO and the Helium Cooled Pebble Bed EUROPEAN-DEMO. According to the established methodology, the complete process of design, improvement and validation has included the complete set of compulsory radiation transport analyses , thermal-hydraulic studies and AJNA thermal-wall model tuning. Furthermore, preliminary assessments of the transient accident scenarios and sensibility studies haw been also performed. So, starting from fully detailed neutronics and thermal­ hydraulic results, a simplified and conservatiw wall model has been implemented in AJNA obtaining reliable results in a short calculation time validating the approach proposed. lndeed, simplified models haw been iteratiwly built and adjusted, achieving a good agreement with the fully detailed simulation and yielding a maximum absolute temperature differences around 10%. The determination and coherence of the temperature distribution obtained using independenttool s and approaches, ANSYS® Fluent® vs AJNA thermal-hydraulic routines, supports the proposed methodology, hence validating the whole results obtained. Newrtheless, the 1D non-conservatiw temperature field, where present, could be compensated by the application of scaling functions , obtaining a perfect match with the most conservative 30 distribution. In this innovative approach, the scaling functions correspond to the ratios between the most conservatiw radial distribution in the fully detailed and the 10 simulations . Moreowr, thanks to the simplified and endorsed model, sensitivities and screening assessment can be easily perforrned showing how the system reacts as consequences of loads, boundary conditions and perturbations. In light of this, the detailed number of study can be extensively reduced. To conclude, this multidisciplinary activity has requested the establishment of a specific framework , including skills and tools.

[es] En el año 2050 la producción de energía podría estar distribuida principalmente entre fuentes renovables lideradas por la fusión nuclear que potencialmente puede proveer grande cantidades de energías para largos tiempos, sin afectar considerablemente el ambiente. Desafortunadamente, la fusión nuclear requiere aun numerosos desarrollos para demostrar entre otros la validez del diseño y la seguridad nuclear, argumentos que son tratados en esta tesis doctoral. Durante los últimos diez años, el Nuclear Engineering Research Group (NERG-UPC) ha estado desarrollando un código de seguridad nuclear denominado AINA (Analyses of IN-vessel Accidents) para evaluar los transitorios de plasma-pared en los TOKAMAK, reactores de fusión nuclear a confinamiento magnético, en caso LOCA ex-vessel y accidentes de combustible. El programa determina las consecuencias en componentes in-vessel como la temperatura de los mismos y su integridad. Teniendo en cuenta la ewlución de las tecnologías, un plan de renovación para AINA ha sido puesto en marcha incluyendo dos tareas específicas en esta tesis.(i) La definición, estandarización y validación de una metodología para el desarrollo de nuevas versiones de AINA para obtener modelos simplificados y fiables que puedan estimar de manera precisa el comportamiento de los componentes estudiados. (ii) El rediseño, generalización y optimización de las rutinas termo-hidráulicas para la determinación de los perfiles de temperatura evaluados por AINA, en caso estacionario o transitorios con el fin de remplazar las anteriores. Así mismo, dichas funciones han sido evaluadas y verificadas a través de comparaciones directas a software comerciales como ANSYS Fluent. De esta manera, AINA ha sido casi completamente replanteado, mejorado y consolidado con especial atención a la documentación, comentarios y verificación en línea con los estándares de software actuales. Novedosas técnicas han sido introducidas para añadir la capacidad de modelación y su capacidad.