0 concentration specie impacting viscosity value
I'm running a version of rhoCentralFoam that has been modified to run with multiplespecies. The case is laminar and I'm looking at boundary layer effects so viscosity is very important. Firstly, I'm getting an incorrect freestream viscosity when I run with my modified rhoCentralFoam. The freestream consists of one specie (air) only. The value for the other specie is zero in all the output files and should be zero for the case.
Further to this issue is if I change the other specie viscosity parameters (LJ potential and collision diameter in this case) the freestream viscosity changes. This is also true for the thermal conductivity which comes from the viscosity code.
I have used the viscosity definition I have now with the origional rhoCentralFoam and got the correct freestream viscosity.
I get the correct density in the freestream.
I don't quite understand how the other species parameters are impacting the freestream viscosity, given that the concentration is zero. The error is 50% or more depending on the specie so its not something like machine precision. There's something wonky going on in the mixture calculation and I can't seem to find it.
My Modified rhoCentralFoam uses hsCombustionThermo, psiChemistryModel and hsPsiMixtureThermo as it's thermo models and the thermotype I'm using is:
Gases being used are air for the freestream, I2 and Kr for the specie present in the boundary layer.
I should note that the thermo models mentioned have not been altered except to allow for my viscosity equations to be used, which were implemented based on the sutherland code. I'm relatively confident in the viscosity code given that rhoCentralFoam gave me the correct freestream values.
I've started outputting the minimum viscosity for each timestep (freestream is the minimum) and if I change the transport parameters of the other specie to match that of air I get the right viscosity.
Scratch that confidence in the viscosity code, after playing around with some of the parameters I'm not sure what the issue is. For example, changing the molecular weight of air changes the freestream viscosity, while changing the molecular weight of the 2nd specie, which if it was contributing to the calculation would change the viscosity... does not... molecular weight is a specie data entry so I'm not sure the error is in the mixing anymore.
I'm combing through the viscosity code now to see if anythings wonky with it, but I didn't write it, we had a summer student prior to my time here do it... and I'm not very familiar with the way the lower level thermo libraries work beyond being able to spot and modify the equations; so I'd appreciate a second set of eyes on it. It's attached here. Equations are based on kinetic theory and I suppose could be useful to someone else as well, assuming theres no errors.
I'm combing through the tutorials that use Sutherland viscosity for a mixture and I'm noticing that all the transport properties are defined the same for all the gases. Is this by design? As in viscosity libraries arn't set up to handle gasses with different viscosity? Or is it for some other reason?
I switched my case over to sutherland viscosity and am getting the same behavior. Changing the transport constants for the specie that is not present in the freestream changes the freestream viscosity. I wonder if my thermo.compressiblegas dict is setup properly, it's shown below:
I'm completely stumped as to why this behavior is occurring, its starting to seem like the transport library is doing some sort of averaging over the constants (the operators + and - seem to indicate this? but I'm not sure, that's a bit beyond my C++ knowledge) If this is the case I'm also perplexed as to why it would do this given that the mixture libraries are present higher up to handle mixing...
I should also note that I've tried to attain the erroneous freestream viscosity value through some combination of averages for the viscosity constants, while I can get close (within 20% by averaging both the values) I can't seem to get the exact value. (I can get the exact single species value)
Does anyone have any ideas as to why this behavior is occurring and what I can do to solve the issue?
|All times are GMT -4. The time now is 06:02.|