Page 1 of 1

Missing "stress_normal" field present in setup.xml

Posted: Fri Dec 06, 2024 2:54 pm
by fracenvi
Hello,

I'm trying to run a calculation in which i try to couple ANN resolution for certain fields with the standard numerical resolution and i need to collect certain data every n time steps. One of them is the measure of the normal stress (that i can easily collect during the postprocess phase) which i haven't figure out how to retrieve. I tried calling the field using

Code: Select all

call field_get_val_s_by_name("stress_normal", bpro_normstress)
(in a f90 user subroutine) as "stress_normal" is what i have in the setup file specifically.

How can i manage to sort this problem?

Thanks to everyone,
Francesco

Re: Missing "stress_normal" field present in setup.xml

Posted: Sat Dec 07, 2024 4:11 pm
by Yvan Fournier
Hello,

stress_normal is not actually stored as a field, but evaluated locally using a cs_function_t mechanism.
The field which is stored is named "boundary_stress" or something similar. Be careful, it is currently extensive and not intensive, so you need to divide values by the surface.

Best regards,

Yvan

Re: Missing "stress_normal" field present in setup.xml

Posted: Sat Dec 07, 2024 4:44 pm
by fracenvi
Hello,

How can i access it then? Beacuse in post-processing i can see both "Normal_stress" and "Stress" as boundary fields and i think the boundary_stress field you are mentioning only refers to "Stress".

Eventually, if i have to evaluate it sohuld i refer to the user example cs_user_extra_operations-nusselt_and_friction_calculation.c?

Thanks as always,
Francesco

Re: Missing "stress_normal" field present in setup.xml

Posted: Tue Dec 10, 2024 11:26 am
by Yvan Fournier
Hello,

You should rather check the cs_post_stress_tangential function in src/base/cs_post_util.cpp, and use that as an example, keeping the normal rather than tangential component in your case.

Regards,

Yvan