XS in nodes

16 views
Skip to first unread message

César Pablo Camusso

unread,
Oct 1, 2018, 7:35:03 AM10/1/18
to 'César Pablo Camusso' via wasora
Hello.
Does anybody know how to get the XS in each node inside the code?
Could it be with wasora_evaluate_expresion?
Thank you.

jeremy theler

unread,
Oct 1, 2018, 7:58:13 AM10/1/18
to was...@seamplex.com
for every property p defined in MATERIAL you have a node-defined (or cell-defined if using fvm) p(x,y,z) or p(x,y) or p(x) depending on the dimension.

You can evaluate them at any point, PRINT_FUNCTION, MESH_POST or MESH_FILL_VECTOR.



--
You received this message because you are subscribed to the Google Groups "wasora" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wasora+un...@seamplex.com.
To post to this group, send email to was...@seamplex.com.
Visit this group at https://groups.google.com/a/seamplex.com/group/wasora/.
To view this discussion on the web visit https://groups.google.com/a/seamplex.com/d/msgid/wasora/88543005.2010046.1538393702420%40mail.yahoo.com.
For more options, visit https://groups.google.com/a/seamplex.com/d/optout.
--
--
jeremy theler
www.seamplex.com

César Pablo Camusso

unread,
Oct 1, 2018, 8:13:03 AM10/1/18
to was...@seamplex.com
Yes, but I need the property inside the code. So, are the properties in each node available inside the code?
For example from int diffusion_elements_results_fill_power(void), you took the eSigmaF[g] from the element (cell) and set the power in a node (point) by multipling by the fluxes.
I need something similar but nuSigmaf in each node.
If milonga already has the properties in each node, I prefer to use them than to calculate them.



diffusion_elements_results_fill_power(void):
.
.
.
  for (k = 0; k < wasora_mesh.main_mesh->n_nodes; k++) {
    den = 0;
    LL_FOREACH(wasora_mesh.main_mesh->node[k].associated_elements, associated_element) {
      element = associated_element->element;
      pow = 0;
      if (element != NULL && element->physical_entity != NULL && element->physical_entity->material != NULL) {
        den += element->type->element_volume(element);
        xs = (xs_t *)element->physical_entity->material->ext;
        if (xs != NULL && xs->eSigmaF != NULL) {
          wasora_var(wasora_mesh.vars.x) = wasora_mesh.main_mesh->node[k].x[0];
          wasora_var(wasora_mesh.vars.y) = wasora_mesh.main_mesh->node[k].x[1];
          wasora_var(wasora_mesh.vars.z) = wasora_mesh.main_mesh->node[k].x[2];

          for (g = 0; g < milonga.groups; g++) {
            pow += wasora_evaluate_expression(xs->eSigmaF[g]) * milonga.functions.phi[g]->data_value[k];
          }
        }
        milonga.functions.pow->data_value[k] += element->type->element_volume(element) * pow;
      }
    }
    if (den != 0) {
      milonga.functions.pow->data_value[k] /= den;
    }
  }




jeremy theler

unread,
Oct 1, 2018, 9:09:21 AM10/1/18
to was...@seamplex.com
No, you need to set the internal variables x y and z to the node's coords and call evaluate_expr

just like the example you quoted
the nusigmaf is evaluated at the nodes, not at the cell


César Pablo Camusso

unread,
Oct 1, 2018, 9:13:34 AM10/1/18
to was...@seamplex.com
Reply all
Reply to author
Forward
0 new messages