How to get in dpf results from node but interpolating only form selected elements.

MaciejB
MaciejB Member Posts: 2
First Comment
**

I have mesh scoping and nodal scoping. I would like to extract temperature from node but considering in interpolation only elements from mesh scoping.

My nodes are at the edge between different elements types. Thus when i am using ops.result.structural_temperature() with nodal scoping I am getting field container with fields split by elshape.

DPF structural_temperature(s)Fields Container

with 2 field(s) defined on labels: elshape time with:

- field 0 {elshape: 2, time: 127} with Nodal location, 1 components and 2 entities.

- field 1 {elshape: 3, time: 127} empty

Answers

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

    In your operator, you should connect a mesh scoping that is elemental, and has the element ids of the elements you want.

    The operator also has a property call requested location which you can set to ‘nodal’ or dpf.locations.nodal.

    this will result in only looking at the elements you want, but providing you a nodal average of those elements.

    note, there are also averaging operators that can convert from elemental to node. If for some reason you don’t want to use the requested location directly in the operator.

  • MaciejB
    MaciejB Member Posts: 2
    First Comment
    **

    Hi Mike,
    Thanks for the replay. Unfortunately I have problem to implement it.

    I am using 'server_version': '6.1',

    print(mscop)
    DPF  Scoping: 
      with Elemental location and 809 entities
    temperature_op = dpf.operators.result.structural_temperature(data_sources=datasource, requested_location= 'nodal')
    temperature_op.inputs.time_scoping.connect(tscop)
    temperature_op.inputs.mesh_scoping.connect(mscop)
    res = temperature_op.outputs.fields_container()
    
    DPFServerException: BFE:11<-averaging from ElementalNodal to nodal is not implemented
    

    I am trying to extract temperature from structural model where temperature is applied by bf.

    Equivalent to this operation in classic.

  • Pierre Thieffry
    Pierre Thieffry Member, Moderator, Employee Posts: 107
    25 Answers Second Anniversary 10 Comments 25 Likes
    ✭✭✭✭

    Hi @MaciejB ,

    you can try an explicit conversion from ElementalNodal to Nodal:

    temperature_op = dpf.operators.result.structural_temperature(data_sources=ds)
    temperature_op.inputs.time_scoping.connect(tscop)
    temperature_op.inputs.mesh_scoping.connect(mscop)
    res = temperature_op.outputs.fields_container()
    
    res_nodal_op=dpf.operators.averaging.elemental_nodal_to_nodal(field=res[0])
    print(res_nodal_op.outputs.field())