I have several named selections to which I want to add heat flow boundary condition. The magnitude for the BC is contained in .csv file.
You can do this using this generic code attached.
The code assumes that the magnitude values in the csv file are structured in the same order of the named selection (named_selection1 = 1st value in csv).