gradient calculation

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Post Reply
lb_yuan
Posts: 16
Joined: Tue Jan 02, 2018 2:02 pm

gradient calculation

Post by lb_yuan »

Hello,

I have a self-defined field called 'prev_temperature'. When I calculate its gradient with field_gradient_scalar, it just crushes. The following is the error message.

/home/bliu/Desktop/Code_Saturne/code_saturne-5.0.8/src/base/cs_field.c:3351: Fatal error.

Field "prev_temperature" with type flag 144
has no value associated with key 37 ("var_cal_opt").


Call stack:
1: 0x7eff74770460 <cs_field_get_key_struct+0xe0> (libsaturne.so.5)
2: 0x7eff74774a46 <cs_field_gradient_scalar+0x66> (libsaturne.so.5)
3: 0x7eff74774c6f <cs_f_field_gradient_scalar+0x7f> (libsaturne.so.5)
4: 0x405a9d <cs_f_user_extra_operations_+0x1065> (cs_solver)
5: 0x7eff746e7f4c <caltri_+0x175c> (libsaturne.so.5)
6: 0x7eff746c536d <cs_run+0x57d> (libsaturne.so.5)
7: 0x7eff746c4cd3 <main+0x113> (libsaturne.so.5)
8: 0x7eff73a55830 <__libc_start_main+0xf0> (libc.so.6)
9: 0x402da9 <_start+0x29> (cs_solver)
End of stack

Regards,
Bo
Yvan Fournier
Posts: 4089
Joined: Mon Feb 20, 2012 3:25 pm

Re: gradient calculation

Post by Yvan Fournier »

Hello,

Yes, this is a known limitation of gradients for "property" and not "resolved" fields, which do not have boundary condition settings. Well try to improve this, but for now:

viewtopic.php?f=2&t=1894&p=10091&hilit= ... ent#p10091

Regards,

Yvan
Post Reply