Coupling of Serpent Neutron Transport Code to OpenFOAM
Transcript of Coupling of Serpent Neutron Transport Code to OpenFOAM
Introduction Theory The buoyantBoussinesqPimpleFoam solver Mesh generation Volumetric power source generation with Serpent OpenFOAM case setup Results
Coupling of Serpent Neutron Transport Code toOpenFOAM
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
Introduction Theory The buoyantBoussinesqPimpleFoam solver Mesh generation Volumetric power source generation with Serpent OpenFOAM case setup Results
1 Introduction
2 Theory
3 The buoyantBoussinesqPimpleFoam solver
4 Mesh generation
5 Volumetric power source generation with Serpent
6 OpenFOAM case setup
7 ResultsAshkhen Nalabndyan Beamer slides template 2012-08-27 2 / 25
Introduction Theory The buoyantBoussinesqPimpleFoam solver Mesh generation Volumetric power source generation with Serpent OpenFOAM case setup Results
Aim and Motivation
The aim of this tutorial is to demonstrate the coupling mechanismbetween OpenFOAM and a neutron transport software Serpent.
The topic of the tutorial is motivated by the need to find newapproaches for tight coupling of neutron kinetics to thermalhydraulics for liquid fueled power plants.
Ashkhen Nalabndyan Beamer slides template 2012-08-27 2 / 25
Introduction Theory The buoyantBoussinesqPimpleFoam solver Mesh generation Volumetric power source generation with Serpent OpenFOAM case setup Results
Prerequisites
The tutorial is developed for the OpenFOAMv1806 and Serpent2.0.The later is developed at the VTT Finalnd and can be obtained ondemand.
To maximize benefits from the tutorial some prior experience withOpenFOAM 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
Introduction Theory The buoyantBoussinesqPimpleFoam solver Mesh generation Volumetric power source generation with Serpent OpenFOAM case setup Results
Heat generation and heat transfer in nuclear fuel
Nuclear fuel is composed of heave fissile actinide elements such asU-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
Introduction Theory The buoyantBoussinesqPimpleFoam solver Mesh generation Volumetric power source generation with Serpent OpenFOAM case setup Results
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
Introduction Theory The buoyantBoussinesqPimpleFoam solver Mesh generation Volumetric power source generation with Serpent OpenFOAM case setup Results
The buoyantBoussinesqPimpleFoam solver
buoyantBoussinesqPimpleFoam is a transient heat transfer solver forincompressible, 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
1 directory, 7 filesAshkhen Nalabndyan Beamer slides template 2012-08-27 6 / 25
Introduction Theory The buoyantBoussinesqPimpleFoam solver Mesh generation Volumetric power source generation with Serpent OpenFOAM case setup Results
The buoyantBoussinesqPimpleFoam.C
Description: Transient solver for buoyant, turbulent flow of incompressiblefluids.Uses the Boussinesq approximation:rho k=(1-beta(T-T ref))rho k = the effective (driving) kinematic densitybeta = 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.HAshkhen Nalabndyan Beamer slides template 2012-08-27 7 / 25
Introduction Theory The buoyantBoussinesqPimpleFoam solver Mesh generation Volumetric power source generation with Serpent OpenFOAM case setup Results
The buoyantBoussinesqPimpleFoam.C
Ashkhen Nalabndyan Beamer slides template 2012-08-27 8 / 25
Introduction Theory The buoyantBoussinesqPimpleFoam solver Mesh generation Volumetric power source generation with Serpent OpenFOAM case setup Results
The buoyantBoussinesqPimpleFoam.C
Ashkhen Nalabndyan Beamer slides template 2012-08-27 9 / 25
Introduction Theory The buoyantBoussinesqPimpleFoam solver Mesh generation Volumetric power source generation with Serpent OpenFOAM case setup Results
TEqn.H
Ashkhen Nalabndyan Beamer slides template 2012-08-27 10 / 25
Introduction Theory The buoyantBoussinesqPimpleFoam solver Mesh generation Volumetric power source generation with Serpent OpenFOAM case setup Results
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
Introduction Theory The buoyantBoussinesqPimpleFoam solver Mesh generation Volumetric power source generation with Serpent OpenFOAM case setup Results
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
Introduction Theory The buoyantBoussinesqPimpleFoam solver Mesh generation Volumetric power source generation with Serpent OpenFOAM case setup Results
Description of Serpent input
Ashkhen Nalabndyan Beamer slides template 2012-08-27 13 / 25
Introduction Theory The buoyantBoussinesqPimpleFoam solver Mesh generation Volumetric power source generation with Serpent OpenFOAM case setup Results
Description of Serpent input
Ashkhen Nalabndyan Beamer slides template 2012-08-27 14 / 25
Introduction Theory The buoyantBoussinesqPimpleFoam solver Mesh generation Volumetric power source generation with Serpent OpenFOAM case setup Results
Coupling interface card
Serpent Multiphysics interface is a set of routines implemented at thesource code level and intended to easily bring in temperature anddensity distributions into OpenFOAM and exporting volumetic powerin a format supported by coupled codes such as OpenFOAM.
There are 9 interfaces in total, and type 9 is based on theOpenFOAM file format and supports FOAM field and mesh files.
Ashkhen Nalabndyan Beamer slides template 2012-08-27 15 / 25
Introduction Theory The buoyantBoussinesqPimpleFoam solver Mesh generation Volumetric power source generation with Serpent OpenFOAM case setup Results
Running Serpent: volpower file
In the Serpent case dir the following files should exist:inpTs.txtrhos.txtmaterials.txtpointsneighbourfacesownersss2Serpentmeshimport.py
Execution: ./sss2 inp
a volpower file is generated in the case folder, which defines avolpower object belonging to Foam volScalarField class.
Ashkhen Nalabndyan Beamer slides template 2012-08-27 16 / 25
Introduction Theory The buoyantBoussinesqPimpleFoam solver Mesh generation Volumetric power source generation with Serpent OpenFOAM case setup Results
FOAM case
OF v1806
cd $FOAM_RUN
cp -r $F OAM_TUTORIALS/heatTransfer/buoyantBoussinesqPimpleFoam/BernardCells .
mv BernardCells testCase tree
Ashkhen Nalabndyan Beamer slides template 2012-08-27 17 / 25
Introduction Theory The buoyantBoussinesqPimpleFoam solver Mesh generation Volumetric power source generation with Serpent OpenFOAM case setup Results
0/volpower
Put the inputfile.msh in the case directory and generate mesh by fluentMeshToFoam.msh command. Alternatively, replace the constant/polymesh directory with the one generated for Serpent. \\
Open the volpower file generated by Serpent, and add boundaries from constant/polymesh/bounsaries files to the end of it:
Ashkhen Nalabndyan Beamer slides template 2012-08-27 18 / 25
Introduction Theory The buoyantBoussinesqPimpleFoam solver Mesh generation Volumetric power source generation with Serpent OpenFOAM case setup Results
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
Introduction Theory The buoyantBoussinesqPimpleFoam solver Mesh generation Volumetric power source generation with Serpent OpenFOAM case setup Results
system/fvoptions
FieldSourceCoeffs
{
fieldNames (h);
sourceFieldNames (volpower);
}
However, if one tries to run the case, an error message appears thatFieldSource is not a recognized Foam source type. Thus, we have to addit.
Ashkhen Nalabndyan Beamer slides template 2012-08-27 20 / 25
Introduction Theory The buoyantBoussinesqPimpleFoam solver Mesh generation Volumetric power source generation with Serpent OpenFOAM case setup Results
fieldSource library
Copyright (C) Timo Niemi, Riku Tuominen 2018 VTT Technical Research Centre of Finland Ltd\\
fieldDource.C
namespace Foam
{
namespace fv
{
defineTypeNameAndDebug(FieldSource, 0);
addToRunTimeSelectionTable
(
option,
FieldSource,
dictionary
);
}
}
...Ashkhen Nalabndyan Beamer slides template 2012-08-27 21 / 25
Introduction Theory The buoyantBoussinesqPimpleFoam solver Mesh generation Volumetric power source generation with Serpent OpenFOAM case setup Results
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 :wcleanwmake
Ashkhen Nalabndyan Beamer slides template 2012-08-27 22 / 25
Introduction Theory The buoyantBoussinesqPimpleFoam solver Mesh generation Volumetric power source generation with Serpent OpenFOAM case setup Results
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
Introduction Theory The buoyantBoussinesqPimpleFoam solver Mesh generation Volumetric power source generation with Serpent OpenFOAM case setup Results
iterate.py
This tutorial describes only one-through iteration between Serpentand OpenFOAM. However, it might be of interest to be able toiterate the process for a specified OpenFOAM timestep. A pythonscript is currently in development to allow to do this.
So, as it can be noticed, first the parameter x and n are specified; theiteration will either stop when the temperature variation within thecell from one iteration to another is less than x%, or when the nnumber 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
Introduction Theory The buoyantBoussinesqPimpleFoam solver Mesh generation Volumetric power source generation with Serpent OpenFOAM case setup Results
T and volpower
Ashkhen Nalabndyan Beamer slides template 2012-08-27 25 / 25