NTERUP loop / forces / possible bug?

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Post Reply
James McNaughton

NTERUP loop / forces / possible bug?

Post by James McNaughton »

Hi,

I was looking at the drag and lift coefficients for laminar flow past a 2D cylinder and the effect that changing NTERUP in usini1 would have. I use the example in usproj to calculate forces.

The attached v1_merged.pdf gives the results, they're not good!

So we looked into how the forces (grep efforts in sources) are calculated and it's a sum ra(iforbr...) in 5 steps. Three of these (1st in preduv, vissec, divrij) are only performed when ITERNS=1 (the loop is performed NTERUP times). However, two parts of this are done on every loop-iteration (condli and 2nd in preduv) so I assume it's damping itelf.

Changed these with an if statement to only be performed for ITERNS = 1 and results are better, v2_merged.pdf.

By the look of it the force-array-sum is only effecting the outputted ensight file (and if you choose to use it in usproj, for example) so can't see it having much of an effect on results.

I've attached the subroutines I changed. Can someone let me know if what I've done is okay.

Cheers,

James
Attachments
v2_merged.pdf
(53.92 KiB) Downloaded 241 times
v1_merged.pdf
(52.31 KiB) Downloaded 244 times
modified_subroutines.tar.gz
(44.52 KiB) Downloaded 246 times
Post Reply