# Understanding CFX Force Calculations on a Wall Due to Shear

 Register Blogs Members List Search Today's Posts Mark Forums Read

February 21, 2024, 03:13
Understanding CFX Force Calculations on a Wall Due to Shear
#1
New Member

Fabio Asaro
Join Date: Sep 2020
Posts: 6
Rep Power: 5
Hello everyone

This question has also been posted in the CFD subreddit:
https://www.reddit.com/r/CFD/comment...ons_on_a_wall/

I am running a easy test case with the aim to understand better how CFX calculates the force acting on a wall due to shear. To this end, I set up a basic scenario involving a small cube placed within a channel. The channel's walls, moving at a velocity of 1m/s (matching the inlet velocity).

For this test, I conducted a stationary simulation using the SST turbulence model. My focus was on analyzing the force acting in x direction exerted on the cube's right side (as highlighted in the accompanying image).

To evaluate the force, I employed three distinct methods (see table).

Interestingly, the first two methods produced nearly identical results. However, calculating the wall shear stress directly through the formula led to a significantly different value. This discrepancy has led me to wonder: Is there an error in my formula, or does CFX employ a unique approach when calculating wall shear stress?

I'm eager to hear your insights or any similar experiences you might have had. Your feedback would be greatly appreciated.

Backround:
Perhaps it's pertinent to briefly share the motivation behind this investigation. Currently, the cube in my simulation represents a solid object, complete with physical walls where the velocity equals zero. However, the ultimate goal of my project is to analyze the forces acting on plants due to wind. Given that meshing a plant directly is impractical, I've opted to model a plant using a porous block. This means that in future simulations, the cube will no longer be a solid entity but a porous domain instead. Consequently, evaluating wall shear stress at the "wall" of the cube becomes infeasible since it doesn't constitute a physical wall per se, but rather an interface. This necessitates the evaluation of friction force via the velocity gradient.
Attached Images
 Screenshot 2024-02-20 115945.jpg (52.4 KB, 5 views) table.png (44.4 KB, 7 views)

 February 21, 2024, 17:45 #2 Super Moderator   Glenn Horrocks Join Date: Mar 2009 Location: Sydney, Australia Posts: 17,700 Rep Power: 143 The force acting on a body is from both shear and pressure. Your comparison does not include the pressure component. Can you explain why is that? UPDATE: Answered, the face is flat and you are looking at the force parallel to the plane, so the only force acting is shear. Are you calculating this in the solver, or in post-processing (CFD-Post or some other post processor)? The reason this is significant is that the solver has the full solution field including variable values at the integration points. The post processors only get the variable values at the nodes. This means post processors have a coarser mesh of variables to calculate from which will result in less accurate calculations. The implication is that if you want really accurate calculations you should do them in the solver and send the result to a monitor point. Then you will be doing the calculation on the highest resolution variable field. __________________ Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum.

February 22, 2024, 02:56
#3
New Member

Fabio Asaro
Join Date: Sep 2020
Posts: 6
Rep Power: 5
Quote:
 Originally Posted by ghorrocks The force acting on a body is from both shear and pressure. Your comparison does not include the pressure component. Can you explain why is that? UPDATE: Answered, the face is flat and you are looking at the force parallel to the plane, so the only force acting is shear. Are you calculating this in the solver, or in post-processing (CFD-Post or some other post processor)? The reason this is significant is that the solver has the full solution field including variable values at the integration points. The post processors only get the variable values at the nodes. This means post processors have a coarser mesh of variables to calculate from which will result in less accurate calculations. The implication is that if you want really accurate calculations you should do them in the solver and send the result to a monitor point. Then you will be doing the calculation on the highest resolution variable field.

Your explanation is intriguing; I hadn't considered the enhanced accuracy during the solving process due to the connectivity among multiple integration points. However, upon monitoring both forces—one calculated using the du/dy approach and the other with the "Wall Shear X" variable (as detailed in the attachment)—I observed consistent results. This aligns with the outcomes derived from calculating values in CFX post within the table using the formulas provided in the first attachment to the post.
Attached Images
 monitor.png (28.5 KB, 6 views)

 February 22, 2024, 03:54 #4 Super Moderator   Glenn Horrocks Join Date: Mar 2009 Location: Sydney, Australia Posts: 17,700 Rep Power: 143 I take it by your answer that you are calculating this in the post processor. If so, then it will be less accurate (so values will not precisely line up) as I described. Please put the calculations in the solver, send the result to a monitor point and rerun the simulation; then see if that improves accuracy. __________________ Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum.

February 22, 2024, 04:20
#5
New Member

Fabio Asaro
Join Date: Sep 2020
Posts: 6
Rep Power: 5
Quote:
 Originally Posted by ghorrocks I take it by your answer that you are calculating this in the post processor. If so, then it will be less accurate (so values will not precisely line up) as I described. Please put the calculations in the solver, send the result to a monitor point and rerun the simulation; then see if that improves accuracy.
Apologies if my previous response was a bit unclear. I actually performed the calculations both ways - directly in the solver using monitor points and also in CFX post. Turns out, the results from both methods show calculate the same values.

 February 22, 2024, 05:32 #6 Super Moderator   Glenn Horrocks Join Date: Mar 2009 Location: Sydney, Australia Posts: 17,700 Rep Power: 143 Strange, I would have thought there would have been a bit of a difference. Can you repeat this comparison with a laminar flow model? The turbulent wall functions might be affecting things. __________________ Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum.

February 22, 2024, 09:37
#7
New Member

Fabio Asaro
Join Date: Sep 2020
Posts: 6
Rep Power: 5
Quote:
 Originally Posted by ghorrocks Strange, I would have thought there would have been a bit of a difference. Can you repeat this comparison with a laminar flow model? The turbulent wall functions might be affecting things.
I've initiated the simulation under laminar conditions with a few adjustments:

1) Bc of oscillations at the monitor points in the laminar model, I implemented symmetry boundary conditions (only a quarter of original domain).

2)I excluded the eddy viscosity from the wall shear stress calculation, now defined as `areaInt(Velocity u.Gradient Y*(Dynamic Viscosity))@wallR`.

Unfortunately, the discrepancy between the two values persists.
Attached Images
 monitor2.png (29.1 KB, 5 views) table2.png (4.5 KB, 3 views)

 February 22, 2024, 17:33 #8 Super Moderator   Glenn Horrocks Join Date: Mar 2009 Location: Sydney, Australia Posts: 17,700 Rep Power: 143 For the laminar flow I would reduce the flow rate or increase the viscosity to make the flow steady. The oscillations are complicating the question. But I suspect you are finding the difference remains in a laminar model as well. I cannot explain the difference, so you are going to have to do some exploring. Some suggestions: * What happens if you converge tighter? * What happens when you refine the mesh? * What happens when you change the advection scheme? * What happens when you change some of the lower level numerical parameters, eg interpolation schemes, Rhie-Chow etc? I would do this study on a laminar flow which is slow enough to be steady state so you do not have the complexity of wall functions and flow transients to deal with. __________________ Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum.