Khamsin Virtual Racecar Challenge 2015

Post here information about your own engineering projects, including but not limited to building your own car or designing a virtual car through CAD.
julien.decharentenay
julien.decharentenay
10
Joined: 02 Jun 2012, 12:31

Re: Khamsin Virtual Racecar Challenge 2015

Post

andylaurence wrote:How does OCCFD determine the OpenFOAM version?
It is an excellent question.

Long winded explanation:

The story is OCCFD runs (or try to) the command "simpleFoam -help" and identify the version from the output - the line "Using:" below.

Code: Select all

C:\Program Files (x86)\blueCFD-2.1>simpleFoam -help

Usage: simpleFoam [OPTIONS]
options:
  -case <dir>       specify alternate case directory, default is the cwd
  -noFunctionObjects
                    do not execute functionObjects
  -parallel         run in parallel
  -roots <(dir1 .. dirN)>
                    slave root directories for distributed running
  -srcDoc           display source code in browser
  -doc              display application documentation in browser
  -help             print the usage

Using: OpenFOAM-2.1 (see www.OpenFOAM.org)
Build: 2.1-88b2f2ae3a0b
The supported versions are (should be) 2.1, 2.2 and 2.3.

Then it gets a little more complicate:
1) If the executable "simpleFoam" is in the path, then it runs the command directly; otherwise
2) It looks for the executable in a number of place (and should not find it there); then
3) It looks for the file "setvars.bat" in similar places, including C:\Program Files\OpenFoam, C:\Program Files\OpenFoam\OpenFoam, c:\Program Files\blueCFD-2.1\OpenFoam-2.1\etc;
4) If it find the file "setvars.bat", it creates a batch file with a number of commands and runs it:

Code: Select all

call {PATH}\setvars.bat
cd {SomePath}
simpleFoam -help
5) If it does not find the file "setvars.bat", it go through the same step (4) looking for the file "batchrc.bat" with a couple of subtleties such as setting the right compiler and MPI lib settings.

Now let's try to solve your problem

1) Start a command prompt;
2) Type "simpleFoam -help". It should return:

Code: Select all

'simpleFoam' is not recognized as an internal or external command,
operable program or batch file.
3) Start an openFoam session using DOS_Mode.bat;
4) Type "simpleFoam -help". It should return the message listed above with the help for the command;

5) Start a command prompt;
6) Type "call {PATH}\setvars.bat"
7) Type "simpleFoam -help". It should return the simpleFoam help.

Let me know what works and what does not work.

julien.decharentenay
julien.decharentenay
10
Joined: 02 Jun 2012, 12:31

Re: Khamsin Virtual Racecar Challenge 2015

Post

CAEdevice wrote:@Julien: I'm out of office so I can't test the complete car. With the.new release of OCCFD most of the issues seem to be.solved. I still receive a geometry error (something like "can't compute area...") but the simulations seems to be completed without any divergence error. I hope to give you more details when I'm back on friday.
Is ImageMagick installed?

[EDIT] In the OCCFD analysis directory you will find an Images directory. Can you check for the two files frontalArea1.bmp and frontalArea2.bmp? These should show a front view of the car in black on white background and a front view of a black square on white background. Let me know if this is not the case.

julien.decharentenay
julien.decharentenay
10
Joined: 02 Jun 2012, 12:31

Re: Khamsin Virtual Racecar Challenge 2015

Post

Xwang wrote:Is it possible to run OCCFD on linux?
@Xwang: Sorry but OCCFD is Windows only at this stage...

julien.decharentenay
julien.decharentenay
10
Joined: 02 Jun 2012, 12:31

Re: Khamsin Virtual Racecar Challenge 2015

Post

RicME85 wrote:Thought I would take a look at OCCFD to see how is it was out of curiosity as I had no issues running Khamsin in previous years and somehow got the pvbatch error even with the latest version.
@RicME85: Can you clarify the error - that is if you want to have more of look?

MadMatt
MadMatt
125
Joined: 08 Jan 2011, 16:04

Re: Khamsin Virtual Racecar Challenge 2015

Post

I want to say kudos for Julien for his work, I know how programming is difficult, not to mention combining it with different software from different platforms. Didn't have the chance to participate to KVRC 2014 so all this is new to me, but really good work Julien!

User avatar
andylaurence
123
Joined: 19 Jul 2011, 15:35

Re: Khamsin Virtual Racecar Challenge 2015

Post

Thanks for the verbose explanation, Julien. Here's the output from the above:

Code: Select all

C:\Users\occfd>simpleFoam -help
'simpleFoam' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\occfd>call "C:\Program Files (x86)\OpenFOAM\setvars.bat"
"Setting environment for mingw-w64 Double Precision (custom mingw-w64)"
C:\Program Files (x86)\OpenFOAM>simpleFoam -help

Usage: simpleFoam [OPTIONS]
options:
  -case <dir>       specify alternate case directory, default is the cwd
  -noFunctionObjects
                    do not execute functionObjects
  -parallel         run in parallel
  -roots <(dir1 .. dirN)>
                    slave root directories for distributed running
  -srcDoc           display source code in browser
  -doc              display application documentation in browser
  -help             print the usage

Using: OpenFOAM-2.1.x (see http://www.OpenFOAM.org)
Build: 2.1.x-d8c2d781a321


C:\Program Files (x86)\OpenFOAM>
Is it that I've installed it to C:\Program Files (x86)\OpenFOAM rather than C:\Program Files\OpenFOAM?

User avatar
andylaurence
123
Joined: 19 Jul 2011, 15:35

Re: Khamsin Virtual Racecar Challenge 2015

Post

andylaurence wrote:Is it that I've installed it to C:\Program Files (x86)\OpenFOAM rather than C:\Program Files\OpenFOAM?
Yep. That's it.

User avatar
CAEdevice
49
Joined: 09 Jan 2014, 15:33
Location: Erba, Italy

Re: Khamsin Virtual Racecar Challenge 2015

Post

julien.decharentenay wrote:
CAEdevice wrote:@Julien: I'm out of office so I can't test the complete car. With the.new release of OCCFD most of the issues seem to be.solved. I still receive a geometry error (something like "can't compute area...") but the simulations seems to be completed without any divergence error. I hope to give you more details when I'm back on friday.
Is ImageMagick installed?

[EDIT] In the OCCFD analysis directory you will find an Images directory. Can you check for the two files frontalArea1.bmp and frontalArea2.bmp? These should show a front view of the car in black on white background and a front view of a black square on white background. Let me know if this is not the case.
Hi Julien,

yes, Image Magic is installed. I also confirm that in the "images" folder I can find the pictures you described.

User avatar
CAEdevice
49
Joined: 09 Jan 2014, 15:33
Location: Erba, Italy

Re: Khamsin Virtual Racecar Challenge 2015

Post

Hi, I'm postprocessing the simultion done with OCCFD even if the html report has not been generated. Is there a way to extract total DF and DRAG (and COP) from Paraview?

User avatar
CAEdevice
49
Joined: 09 Jan 2014, 15:33
Location: Erba, Italy

Re: Khamsin Virtual Racecar Challenge 2015

Post

I have a question about the solver (a bit off topic).
I find a great difference if a use e steady state solution or a unsteady solution: the DF/DRAG ration is about the same, but with an unsteady solution the DF and DRAG values are about 50% higher. In both cases I tested the mesh size sensitivity and (for the unsteady run) the timestep sensitivity. Is there a CFD expert that can help me intepreting that results?

PS: Using last year geometry, the unsteady solution is nearer to the KVRC official solver.

MadMatt
MadMatt
125
Joined: 08 Jan 2011, 16:04

Re: Khamsin Virtual Racecar Challenge 2015

Post

Matteo, which software are you using? I am not doing the simulations in an unsteady state as rotating wheels can be perfectly managed by your solver in steady state. Check out that link: http://www.symscape.com/steady-state-or ... simulation

What was your cells range for the mesh sensitivity test you performed? Were the results similar?

Also be careful with OCCFD (and openFoam), as I have issues with the twin element rear wing because it links the 2 airfoil profiles together and gives of course results that are quite different from the commercial CFD software that I am using. Julien is on it I think, I have not performed other simulations because of this, but I believe it can be adressed quite simply.

What is you and other people's running time for a complete OCCFD simulation (from the right-click to the generation of the .html file)?

User avatar
CAEdevice
49
Joined: 09 Jan 2014, 15:33
Location: Erba, Italy

Re: Khamsin Virtual Racecar Challenge 2015

Post

Hi Mathieu, I' trying with an unsteady solver because I think it would work better with big vortex. It has not to do with rotating wheels or moving ground. I'using SWX Flow Sim SE.

About the total simulation time: I could not obtain the html report (did you?) yet. The simulation anyway seems to be completed in a couple of hours (but I'm testing a simplified car).

MadMatt
MadMatt
125
Joined: 08 Jan 2011, 16:04

Re: Khamsin Virtual Racecar Challenge 2015

Post

I see, yes in that case you might need to run it in unsteady state, but it depens on how your residuals and force monitors look like. I agree that in few occasions I do get weird traces that make me think I should have tried unsteady but to judge relative performance it is enough. :)

My main concern is regarding the mesh at the moment.

MadMatt
MadMatt
125
Joined: 08 Jan 2011, 16:04

Re: Khamsin Virtual Racecar Challenge 2015

Post

Just for the sake of it I ran one simulation in unsteady state, and results are almost identical with steady state mode.
Last edited by MadMatt on 07 Feb 2015, 14:37, edited 1 time in total.

User avatar
CAEdevice
49
Joined: 09 Jan 2014, 15:33
Location: Erba, Italy

Re: Khamsin Virtual Racecar Challenge 2015

Post

MadMatt wrote:Just for the sake of it I ran one simulation in unsteady state, and results are almost identical with steady state mode (+3% in unsteady state).
The same for me if I use a quite big timestep. Wich timestep value have you set?