Hello,
I'm trying to calculate a drag force on a plate in a 2D mesh. I copied the code from viewtopic.php?p=17551&hilit=drag+force#p17551. For the output file to be filled, I need to add a User Specified Field. I did it manually (on Gui), but do not understand how they work. I do not know what location I should put (boundary gives me only zeros...).
The problem is that when I change the speed from the inlet, the forces do not change, nor vary after the second time step (see boundary_force_table.csv).
Does anyone have some hints to give ?
Thanks !
Bat
Code version : code_saturne 8.3
(I can't manage to insert more files, but I can send them if needed)
Measuring forces
Forum rules
Please read the forum usage recommendations before posting.
Please read the forum usage recommendations before posting.
Measuring forces
- Attachments
-
- setup.xml
- (8.19 KiB) Downloaded 553 times
-
- setup.log
- (32.07 KiB) Downloaded 554 times
-
- cs_user_extra_operations-boundary_forces.c
- (6.34 KiB) Downloaded 576 times
Re: Measuring forces
In the end, I found why the solution was not being plotted, but there are multiple possible causes :
- in the C file, the field is "boundary_stress", not "boundary_force"
- I had deactivated the postprocessing of the stress in GUI (see screenshot) in the solution control...
With these two changes, it works !
- in the C file, the field is "boundary_stress", not "boundary_force"
- I had deactivated the postprocessing of the stress in GUI (see screenshot) in the solution control...
With these two changes, it works !
-
- Posts: 4206
- Joined: Mon Feb 20, 2012 3:25 pm
Re: Measuring forces
Hello,
Did you try visualizing the boundary stresses ? to check for the sensitivity when you increase the velocity ?
This may help you determine if/where there is a bug (i.e. bug in you code, bug in upstream code_saturne, or no obvious bug but forces in given zone not too sensitive to velocity) ?
Best regards,
Yvan
Did you try visualizing the boundary stresses ? to check for the sensitivity when you increase the velocity ?
This may help you determine if/where there is a bug (i.e. bug in you code, bug in upstream code_saturne, or no obvious bug but forces in given zone not too sensitive to velocity) ?
Best regards,
Yvan
Re: Measuring forces
I confirm that if this is not checked in the GUI (which the hover text makes reference to ipstdv which hasn't existed since v7, it seems), then this hides the boundary stress not just from the output files, but also cs_user_extra_operations (unclear if that is desired behavior or not).
By chance, are there plans on integrating force calculation into the GUI in the future? It seems like a relatively common thing.
By chance, are there plans on integrating force calculation into the GUI in the future? It seems like a relatively common thing.
-
- Posts: 4206
- Joined: Mon Feb 20, 2012 3:25 pm
Re: Measuring forces
Hello,
I think a colleague had plans for "summation by zone" of selected variables, which would fit here, so yes, there are plans for this in the GUI, though I have no idea on where this sits on the priority list.
Best regards,
Yvan
I think a colleague had plans for "summation by zone" of selected variables, which would fit here, so yes, there are plans for this in the GUI, though I have no idea on where this sits on the priority list.
Best regards,
Yvan