Coupling of Serpent Neutron Transport Code to OpenFOAM Ashkhen Nalbandyan Center for Nuclear Technologies, Technnical University of Denmark, Roskilde, Denmark 2018-11-29 Ashkhen Nalabndyan Beamer slides template 2012-08-27 1 / 25
1 Introduction 2 Theory 3 The buoyantboussinesqpimplefoam solver 4 Mesh generation 5 Volumetric power source generation with Serpent 6 OpenFOAM case setup 7 Results Ashkhen Nalabndyan Beamer slides template 2012-08-27 2 / 25
Aim and Motivation The aim of this tutorial is to demonstrate the coupling mechanism between OpenFOAM and a neutron transport software Serpent. The topic of the tutorial is motivated by the need to find new approaches for tight coupling of neutron kinetics to thermal hydraulics for liquid fueled power plants. Ashkhen Nalabndyan Beamer slides template 2012-08-27 2 / 25
Prerequisites The tutorial is developed for the OpenFOAMv1806 and Serpent2.0. The later is developed at the VTT Finalnd and can be obtained on demand. To maximize benefits from the tutorial some prior experience with OpenFOAM is necessary. It is also suggested to take a look at Serpent documentation [2,3]. Ashkhen Nalabndyan Beamer slides template 2012-08-27 3 / 25
Heat generation and heat transfer in nuclear fuel Nuclear fuel is composed of heave fissile actinide elements such as U-235, U-233, Th-232. The proccess responsible for heat generation if nuclear fission, e.g. Ashkhen Nalabndyan Beamer slides template 2012-08-27 4 / 25
Test Case Cylindrical liquid fuel element, d=6 cm, l=20 cm Inlet, outlet, walls Ashkhen Nalabndyan Beamer slides template 2012-08-27 5 / 25
1 directory, 7 files Ashkhen Nalabndyan Beamer slides template 2012-08-27 6 / 25 The buoyantboussinesqpimplefoam solver buoyantboussinesqpimplefoam is a transient heat transfer solver for incompressible, turbulent flow with natural convection. OFv1806 run cd \$FOAM_SOLVERS tree heattransfer/buoyantboussinesqpimplefoam buoyantboussinesqpimplefoam.c createfields.h Make files options peqn.h TEqn.H UEqn.H
The buoyantboussinesqpimplefoam.c Description: Transient solver for buoyant, turbulent flow of incompressible fluids. Uses the Boussinesq approximation: rho k=(1-beta(t-t ref)) rho k = the effective (driving) kinematic density beta = thermal expansion coefficient [1/K] T = temperature [K] T ref = reference temperature [K] Valid when: beta(t - T ref)/rho ref << 1 # include fvcfd.h # include singlephasetransportmodel.h # include turbulenttransportmodel.h # include radiationmodel.h # include fvoptions.h # include pimplecontrol.h Ashkhen Nalabndyan Beamer slides template 2012-08-27 7 / 25
The buoyantboussinesqpimplefoam.c Ashkhen Nalabndyan Beamer slides template 2012-08-27 8 / 25
The buoyantboussinesqpimplefoam.c Ashkhen Nalabndyan Beamer slides template 2012-08-27 9 / 25
TEqn.H Ashkhen Nalabndyan Beamer slides template 2012-08-27 10 / 25
Generating identical mesh for OpenFOAM and Serpent The mesh is generated using the ANSYS CFX inbuilt mesher. Alternatively, one can use the gmesh software. Generate the mesh file and export it in.msh format Copy to any OpenFOAM case directory, e.g. $FOAM TUTORIALS/heatTransfer/buoyantSimpleFoam/buoyantCavity Type: fluentmeshtofoam inputfilename.msh Run: checkmesh Ashkhen Nalabndyan Beamer slides template 2012-08-27 11 / 25
Mesh generation Do: (Serpent2.0 is the user case dir for Serpent) cp points /home/asnalb/dtu/courses/chalmersoscfd/serpent2.0 cp faces /home/asnalb/dtu/courses/chalmersoscfd/serpent2.0 cp neighbour /home/asnalb/dtu/courses/chalmersoscfd/serpent2.0 cp owner /home/asnalb/dtu/courses/chalmersoscfd/serpent2.0 Ashkhen Nalabndyan Beamer slides template 2012-08-27 12 / 25
Description of Serpent input Ashkhen Nalabndyan Beamer slides template 2012-08-27 13 / 25
Description of Serpent input Ashkhen Nalabndyan Beamer slides template 2012-08-27 14 / 25
Coupling interface card Serpent Multiphysics interface is a set of routines implemented at the source code level and intended to easily bring in temperature and density distributions into OpenFOAM and exporting volumetic power in a format supported by coupled codes such as OpenFOAM. There are 9 interfaces in total, and type 9 is based on the OpenFOAM file format and supports FOAM field and mesh files. Ashkhen Nalabndyan Beamer slides template 2012-08-27 15 / 25
Running Serpent: volpower file In the Serpent case dir the following files should exist: inp Ts.txt rhos.txt materials.txt points neighbour faces owner sss2 Serpentmeshimport.py Execution:./sss2 inp a volpower file is generated in the case folder, which defines a volpower object belonging to Foam volscalarfield class. Ashkhen Nalabndyan Beamer slides template 2012-08-27 16 / 25
FOAM case OF v1806 cd $FOAM_RUN cp -r $F OAM_TUTORIALS/heatTransfer/buoyantBoussinesqPimpl mv BernardCells testcase tree Ashkhen Nalabndyan Beamer slides template 2012-08-27 17 / 25
0/volpower Put the inputfile.msh in the case directory and generate mesh Open the volpower file generated by Serpent, and add boundarie Ashkhen Nalabndyan Beamer slides template 2012-08-27 18 / 25
system/fvoptions FoamFile { version 2.0; format ascii; class dictionary; location "system"; object fvoptions; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * heatsource { type FieldSource; active yes; selectionmode all; Ashkhen Nalabndyan Beamer slides template 2012-08-27 19 / 25
system/fvoptions FieldSourceCoeffs { fieldnames (h); sourcefieldnames (volpower); } However, if one tries to run the case, an error message appears that FieldSource is not a recognized Foam source type. Thus, we have to add it. Ashkhen Nalabndyan Beamer slides template 2012-08-27 20 / 25
Copyright (C) Timo Niemi, Riku Tuominen 2018 VTT Technical Re fielddource.c namespace Foam { namespace fv { definetypenameanddebug(fieldsource, 0); addtoruntimeselectiontable ( option, FieldSource, dictionary ); } }... Ashkhen Nalabndyan Beamer slides template 2012-08-27 21 / 25 fieldsource library
fieldsource library The structure of the the fieldsource folder tree fieldsource fieldsource.c fieldsource.h lninclude fieldsource.c ->../fieldsource.c fieldsource.h ->../fieldsource.h Make files options Compile by : wclean wmake Ashkhen Nalabndyan Beamer slides template 2012-08-27 22 / 25
system/controldict libs ("libfieldsource.so"); application buoyantboussinesqpimplefoam; startfrom latesttime; starttime 0; stopat endtime; endtime 10; deltat 0.1; writecontrol runtime; writeinterval 1; purgewrite 0; writeformat ascii; writeprecision 6; writecompression off; timeformat general; Ashkhen Nalabndyan Beamer slides template 2012-08-27 23 / 25
iterate.py This tutorial describes only one-through iteration between Serpent and OpenFOAM. However, it might be of interest to be able to iterate the process for a specified OpenFOAM timestep. A python script is currently in development to allow to do this. So, as it can be noticed, first the parameter x and n are specified; the iteration will either stop when the temperature variation within the cell from one iteration to another is less than x%, or when the n number of iterations is done. A corresponding while loop has to be chosen to do that. Ashkhen Nalabndyan Beamer slides template 2012-08-27 24 / 25
T and volpower Ashkhen Nalabndyan Beamer slides template 2012-08-27 25 / 25