# Discrepancy in side force front and rear axle split

### Summary

The side force front and rear axle split seems incorrect.

Below is a NACA-0012 aerofoil with the freestream velocity at 5 degrees to the chord. The span is in the Z direction. The red dot is the location of the centre of rotation (CofR). All forces displayed in the image are equivalent to the force output from OpenFOAM.

You can see that the pressure side of the aerofoil is the positive Y side. This should mean that we get a net negative force in Y which is as expected as Cs = -2.097. This also matches up with CmYaw as if we have a negative force which is positioned more forward of the CofR we should expect a positive yaw moment using the right hand rule. This is also as expected and I trust that these values are being reported correctly by OpenFOAM.

However the front and rear axle side force splits do not match up with what we should expect. Firstly, given that the entirety of this wing sits more forward than the CofR you would expect that the force magnitude split would be more biased to the front axle, however, we see that the magnitude of the force on the rear axle is greater than the front. Secondly, if we consider the moments about the CofR and only consider the forces on the front and rear axle. The rear axle side force as reported from OpenFOAM is negative and large and the front axle is also negative but much smaller. This results in a net negative moment with the right hand rule which is counter to what CmYaw is reporting.

Furthermore the front and rear axle split for Cz seems to be working as expected when interrogated in the same manner as the side forces. Below are the Cz force values.

The source code (https://www.openfoam.com/documentation/guides/latest/api/forceCoeffs_8H_source.html) reports that the front and rear axle splits are as shown in the image below. I believe that the equations for Cz_f,r are correct, however the equations for Cs_f,r and most likely Cd_f,r are incorrect. This is due to the direction of the moment axis changing depending on whether you are resolving forces about the x, y or z axis.

Consider the diagram below where the forces about the rear axle have been resolved. The direction of positive force is upwards and the direction of positive X is to the right. The displacement vectors have all been calculated in the direction away from the rear axle which is the correct convention when dealing with moments i.e M = OR x F where all quantities are vectors and O is the point about which the moment is being calculated. We do not know which direction M is positive so we keep it consistent with the positive directions of our axes using +ve X as the displacement vector and +ve F as the force vector giving us positive moment anti-clockwise as we look at the diagram when we use the right hand rule. When resolving moments about the rear axle, the equation we end up with for the force on the front axle is, F_f = F/2 - M/Lref. This does not match up with what the script in OpenFOAM is doing and that is because we have not properly considered the direction of M.

If M is the pitching moment about the Y-axis, which is going into the page as I have drawn it and forces are acting in the positive Z direction, then using the right hand rule a positive pitching moment about CofR is when the front axle moves in positive Z. This is clockwise in relation to the force diagram which is the opposite of the convention we have drawn M to be, thus the sign of M needs to be flipped. Therefore F_f = F/2 - M/Lref becomes Fz_f = Fz/2 + M_pitch/Lref. And this is exactly what the OpenFOAM script is doing for Cz, as shown above from the source code, which explains why Cz_f,r are behaving as expected.

However, if M is the yaw moment about the Z-axis, which is going out of the page as I have drawn it, and forces are acting in the positive Y direction then the direction of positive M is consistent with my diagram using the right hand rule and then we get Fs_f = Fs/2 - M_yaw/Lref. This is the opposite to what OpenFOAM currently does and ultimately means that the Cs_f and Cs_r values should be swapped around. If that is the case then going back to my aerofoil at the top of the page, if Cs_f and Cs_r were swapped around it would make sense in terms of the magnitude of the front and rear force split and it would be consistent with the direction of the yaw moment.

### Steps to reproduce

This is an issue with the forceCoeffs post processing function.

Run a wing with the spanwise direction in Z and specify the CofR to be more rearward than the wing. Then initialise the run such that the inlet velocity is at an incidence to the wing.

###
*bug* behaviour?

What is the current Currently front rear force splits are as follows:

Cz_{f,r} = Cz/2 {+,-} Cm_Pitch

Cs_{f,r} = Cs/2 {+,-} Cm_Yaw

Cd_{f,r} = Cd/2 {+,-} Cm_Roll

###
*correct* behavior?

What is the expected The front rear force splits should be as follows:

Cz_{f,r} = Cz/2 {+,-} Cm_Pitch

Cs_{f,r} = Cs/2 **{-,+}** Cm_Yaw

~~Cd_{f,r} = Cd/2 {+,-} Cm_Roll~~

The front and rear axle split for drag should not be dependent on CmRoll as the roll axis is parallel to the drag axis therefore drag can not be contributing to CmRoll and hence CmRoll can not be used to calculate the drag force split between front and rear axle.

I am unsure as to how to adapt the script to obtain Cd_f,r or if it is even possible. I believe front and rear drag is always a 50/50 split as the direction of the vector going from front to rear axle is in the same direction as drag therefore drag from any component or cell will produce the same moment on the front and rear axles resulting in the front and rear drag split being 50/50.

### Environment information

- OpenFOAM version : v2206 (v2212 still has the same source code in question)

### Possible fixes

Line 382 and 386 in the page below need changing depending on which force the front and rear axle split is being calculated for.

https://www.openfoam.com/documentation/guides/latest/api/forceCoeffs_8H_source.html

\label bug