|
[Sponsors] |
July 20, 2021, 21:52 |
Best Approach for Force vs Velocity
|
#1 |
New Member
Lee
Join Date: Jul 2021
Posts: 3
Rep Power: 5 |
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! |
|
July 23, 2021, 06:16 |
|
#2 |
Senior Member
|
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 { type uniformFixedValue; uniformValue table ( (0 (1 0 0)) (3000 (1 0 0)) (3001 (2 0 0)) (4000 (2 0 0)) (4001 (3 0 0)) (5000 (3 0 0)) ); } 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 epsilon: turbulentMixingLengthDissipationRateInlet omega: turbulentMixingLengthFrequencyInlet |
|
July 23, 2021, 08:55 |
|
#3 |
New Member
Lee
Join Date: Jul 2021
Posts: 3
Rep Power: 5 |
Thank you!
That makes a lot of sense, I will try it out today! |
|
July 25, 2021, 21:20 |
Update Tried
|
#4 |
New Member
Lee
Join Date: Jul 2021
Posts: 3
Rep Power: 5 |
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: wrong token type - expected Scalar, found on line 14 the punctuation token '(' file: /home/openfoam/OpenFoam/openfoam-8/run/cube_multispeed/0/k/boundaryField/inlet/uniformValue at line 14. 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. |
|
July 26, 2021, 07:03 |
|
#5 | |
Senior Member
|
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 { type uniformFixedValue; uniformValue table ( (0 0.1) (3000 0.1) (3001 0.4) (4000 0.4) (4001 0.9) (5000 0.9) ); } 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 |
||
Tags |
force, simplefoam, vehicle aerodynamics, velocity |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
DEFINE_DPM_DRAG - fluid phase velocity correction | tarjeivs | Fluent UDF and Scheme Programming | 0 | March 20, 2021 07:25 |
atmBoundaryLayerInletVelocity - Velocity Profile not continuous through domain | sdfij6354 | OpenFOAM Running, Solving & CFD | 3 | July 26, 2017 17:16 |
Multiphase flow - incorrect velocity on inlet | Mike_Tom | CFX | 6 | September 29, 2016 02:27 |
Velocity in Porous medium : HELP! HELP! HELP! | Kali Sanjay | Phoenics | 0 | November 6, 2006 07:10 |
what the result is negatif pressure at inlet | chong chee nan | FLUENT | 0 | December 29, 2001 06:13 |