Best Approach for Force vs Velocity
Hello Openfoam forum members!
I am seeking some advice on the best method for deriving a Force vs Velocity curve in Openfoamv8 for an automobile. I have adapted the simpleFoam motorbike example to suit the geometry & volume of my vehicle. And, I have copied this case and run it at different inlet velocities which yields an increase in cd or forces (I don't really understand why Cd changes with velocity, but I can ask that later) roughly proportional to v^2 which makes sense. I expect there is a more efficient method for doing this analysis where I can start one run that vary the simpleFoam steady state inlet conditions over multiple steps, but I am struggling to find a good example where someone has done something similar, could you point me to a good example? I get the impression I could do a transient solution of this problem, and ramp the velocity, but that seems like overkill for my problem. Thank You! |
Hi,
For the single simpleFoam run you could specify your inlet with the uniformFixedValue boundary condition, which is constant in space, but can vary as a (patch)Function1. For instance you could use a table that specifies the velocity as a function of time/iteration like: Code:
inlet You should check if the forces/residuals converge within these 1000 iterations. Probably you also want to use inlet conditions for k and epsilon/omega (or whatever turbulence quantities you have) that scale with the velocity, e.g. Code:
k: turbulentIntensityKineticEnergyInlet |
Thank you!
That makes a lot of sense, I will try it out today! |
Update Tried
Your explanation made sense, and from the examples I find online, I would think it would work, but upon making that modification, cleaning and attempting to run I get this error
Code:
FOAM FATAL IO ERROR: Where line 14 is the beginning of this uniformFixedValue table we are creating. Do I need to make changes elsewhere in my code so that it is expecting a table rather than a scalar value? I have tried adjusting the controldict iterations to match the table, but to no success. Thank you again. If uploading my files would be helpful let me know. Currently it is just a simple cube I was using to do some basic F=Cd*A*v^2 correlation with. |
Hi,
The error you post is in regards to the k file, which is indeed a scalar and not a vector (like U is): Quote:
Code:
inlet Or like I said in my first reply use the turbulent inlet conditions based on intensity and mixingLength instead of tables. Hope this helps. Cheers, Tom |
All times are GMT -4. The time now is 02:45. |