Page 1 of 1

To use first and second order in a separate regions

Posted: Mon Mar 03, 2014 5:10 pm
by cyrillic
Hello,

In my work I am postprocessing two solutions for scalars that should be close matches and making comparisons. One scalar is normal, eg temperature, and the other is the square of this, eg temperature squared - I solve a transport equation for this. I will have a boundary in the geometry that is either constant flux or value. The two solutions can be compared and they are expected to be close matches.

There has been no problem with the constant flux boundary results for all schemes, they match as expected. It also works well with constant value boundary with the first order scheme. However, when I use second order schemes, by setting blencv=1.0 and ischcv=1/0, I have found that comparison in the first cells along the constant value boundary walls are unexpectedly large. They don't appear to match the rest of the comparison's distribution, and they also suggest an unexpected source of error in this location because the comparison should be approaching zero for this boundary.

I would like to see what happens if the simulation uses the first order scheme in the first row of cells against the boundary, and second order in the rest. Is there already a way to allow Saturne to do this?

Thank you for your help,
Stuart

Re: To use first and second order in a separate regions

Posted: Mon Mar 03, 2014 7:09 pm
by Yvan Fournier
Hello,

I'll let others answer in more detail to your questions, as I am not a specialist in these parts of the code, but when comparing first and second order schemes, did you make sure you deactivated the slope test using the "isstpc" keyword in user subroutines ? With the slope test active, you never know when the test kicks in and locally adds upwinding, degrading the scheme to first order, and possibly polluting your tests...

Best regards,

Yvan

Re: To use first and second order in a separate regions

Posted: Mon Mar 03, 2014 9:12 pm
by cyrillic
Hi, thanks for the suggestion. The slope test was actually active, although I had originally intended for it not to be. However, deactivating it did not affect the feature I am trying to remove. The first row of cells along the constant value boundary are still much larger than expected.

I have attached a picture to show the problem. What's shown is for the flow around a cylinder at a constant temperature. I have solved to find the temperature, as well as solved an additional equation to find the temperature squared. The pictures show the absolute values of the difference between the temperature solution squared and the temperature squared solution. From left to right is for the second ordered centred, then SOLU, then first order upwind.

Along the boundary these distributions should be going to zero since the two solutions are defined here.

Regards,
Stuart