Elemental temperature with dpf (operators)

Ali Na
Ali Na Member Posts: 2
First Comment
**

I would like to get an average tempererature value for each element (the type is solid 279) with operators in dpf and an elemental mesh scoping. It works pretty fine but the elemental temeperature seems to be an average value of only the corner nodes' temeprature. The midside nodes are excluded in calculation of mean temeprature. Is there any way to acount for the temperatures of the midside nodes as well?
The code is as following:

import mech_dpf
import Ans.DataProcessing as dpf
mech_dpf.setExtAPI(ExtAPI)
analysis=Model.Analyses[0]
dataSource = dpf.DataSources(analysis.ResultFileName)
model=dpf.Model(dataSource)

-> Time Scoping

timesc=dpf.Scoping()
timesc.Location=dpf.locations.time_freq_sets
timesc.Ids= range(1,model.TimeFreqSupport.NumberSets+1)

nsList=model.AvailableNamedSelections

nsScs={}
for ns in nsList:
nsScs[ns]=model.GetNamedSelection(ns)

elSc=nsScs["FF"]

tOP= dpf.operators.result.temperature()
tOP.inputs.data_sources.Connect(dataSource)
tOP.inputs.time_scoping.Connect(timesc)
tOP.inputs.mesh_scoping.Connect(elSc)
ttf=tOP.outputs.fields_container.GetData()

Answers

  • Mike.Thompson
    Mike.Thompson Member, Employee Posts: 367
    25 Answers 100 Comments Second Anniversary 25 Likes
    ✭✭✭✭

    You could try to get the nodal temperature data then use the averaging operators. Make sure the midsize nodes are included in the nodal field data. There is an operator to extend to midsize nodes if needed.