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

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

Welcome!

It looks like you're new here. Sign in or register to get started.

Answers

  • Member, Employee Posts: 385
    25 Answers 100 Comments Second Anniversary 25 Likes
    ✭✭✭✭

    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.

  • 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',

    1. print(mscop)
    2. DPF Scoping:
    3. with Elemental location and 809 entities
    4. temperature_op = dpf.operators.result.structural_temperature(data_sources=datasource, requested_location= 'nodal')
    5. temperature_op.inputs.time_scoping.connect(tscop)
    6. temperature_op.inputs.mesh_scoping.connect(mscop)
    7. res = temperature_op.outputs.fields_container()
    8.  
    9. 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.

  • Member, Moderator, Employee Posts: 108
    25 Answers Second Anniversary 10 Comments 25 Likes
    ✭✭✭✭

    Hi @MaciejB ,

    you can try an explicit conversion from ElementalNodal to Nodal:

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

Welcome!

It looks like you're new here. Sign in or register to get started.