CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM

Coupling Dakota with OpenFoam!

Register Blogs Community New Posts Updated Threads Search

Like Tree10Likes
  • 1 Post By CFD-Lover
  • 3 Post By Dipsomaniac
  • 3 Post By Tobi
  • 3 Post By linnemann

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 23, 2017, 17:57
Default Coupling Dakota with OpenFoam!
  #1
Member
 
OpenFoam
Join Date: Jun 2016
Posts: 82
Rep Power: 10
CFD-Lover is on a distinguished road
Hi Foamers,

I have recently installed Dakota to be applied to some interesting cases that I created for my project. All grids were created using Gmsh. However, I don't really know whether I will be able to preform shape parametrization and moving mesh for grids generated using Gmsh as well as Dakota's capabilities to handle meshes generated using Gmsh. I need to use Dakota to optimize NACA0012 airfoil type just for verifications. Has anyone done any similar optimizations could bring up to speed.

Thanks in advance,

Best,
mechEngineer likes this.
CFD-Lover is offline   Reply With Quote

Old   March 24, 2017, 03:48
Default
  #2
Member
 
Brian Willis
Join Date: Mar 2011
Location: Cape Town, South Africa
Posts: 58
Rep Power: 15
Dipsomaniac is on a distinguished road
Hello

A great place to start with the coupling of OpenFOAM and Dokata is the tutorial from Wolf Dynamics, linked below

http://www.wolfdynamics.com/tutorials.html?id=46

It has the case setup and an extensive presentation attached to it.

Cheers,
Brian
Tobi, lebc and CFD-Lover like this.
Dipsomaniac is offline   Reply With Quote

Old   March 26, 2017, 18:23
Default
  #3
Member
 
OpenFoam
Join Date: Jun 2016
Posts: 82
Rep Power: 10
CFD-Lover is on a distinguished road
Many thanks Brian for the valuable link! I will spend some time reading and following the case file and let you know how it goes with me!

Thanks Again,
CFD-Lover is offline   Reply With Quote

Old   March 27, 2017, 14:35
Default
  #4
Member
 
OpenFoam
Join Date: Jun 2016
Posts: 82
Rep Power: 10
CFD-Lover is on a distinguished road
Hi Brian,

I have got the case files from the link that you suggested. However, there weren't enough information on how do you run the NACA airfoil case. Have you run that case before? Could you please walk me though?

Thanks in advance,
CFD-Lover is offline   Reply With Quote

Old   March 27, 2017, 16:03
Default
  #5
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Just want to give you more information (if you ever used the search function, you would find them too):

http://openfoamwiki.net/index.php/Si...l_Optimization

http://openfoamwiki.net/index.php/Howto_DAKOTA_OpenFOAM (Section 1.3)

https://www.cfd-online.com/Forums/op...-tutorial.html

https://www.cfd-online.com/Forums/op...-tutorial.html

http://www.holzmann-cfd.de/index.php/en/dakota-coupling

And of course the link provided above (that you already checked out).
elvis, Dipsomaniac and CFD-Lover like this.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   March 27, 2017, 16:14
Default
  #6
Member
 
OpenFoam
Join Date: Jun 2016
Posts: 82
Rep Power: 10
CFD-Lover is on a distinguished road
Hi Topi,

Many thanks for the massive links. These links will definitely make me so busy. I am currently facing some issues getting the following case to work http://www.mediafire.com/file/72dtp6...ultidim.tar.gz. Would be possible to walk me through if you got some time.

Thanks in advance,
CFD-Lover is offline   Reply With Quote

Old   March 27, 2017, 16:21
Default
  #7
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hi,

I could check the case but I have no time for that (sorry). But instead, you can check my cases (last link). Here, I provided a run script and everything works well. Good luck.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   March 27, 2017, 16:23
Default
  #8
Member
 
OpenFoam
Join Date: Jun 2016
Posts: 82
Rep Power: 10
CFD-Lover is on a distinguished road
Thanks again.

Best,
CFD-Lover is offline   Reply With Quote

Old   March 27, 2017, 17:16
Default
  #9
Member
 
OpenFoam
Join Date: Jun 2016
Posts: 82
Rep Power: 10
CFD-Lover is on a distinguished road
Hi,

I just downloaded the case the you suggested but it didn't work following the Read-me file. I am using OpenFoam v2.3.1.

Thanks,
CFD-Lover is offline   Reply With Quote

Old   March 28, 2017, 04:26
Default
  #10
Senior Member
 
linnemann's Avatar
 
Niels Nielsen
Join Date: Mar 2009
Location: NJ - Denmark
Posts: 556
Rep Power: 27
linnemann will become famous soon enough
Hi

Just my two cents from using Dakota.

Much easier to get running with Pyopt http://www.pyopt.org/

I have made a simple tutorial here https://github.com/nelinnemann/openf...m/pyOpt-2D-car
akidess, Tobi and CFD-Lover like this.
__________________
Linnemann

PS. I do not do personal support, so please post in the forums.
linnemann is offline   Reply With Quote

Old   March 28, 2017, 06:31
Default
  #11
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 30
akidess will become famous soon enough
In your tutorial you selected NSGA2 as your optimizer - would you recommend this as a good choice for this class of problems, or did you select it without much thought put into it?
__________________
*On twitter @akidTwit
*Spend as much time formulating your questions as you expect people to spend on their answer.
akidess is offline   Reply With Quote

Old   March 28, 2017, 09:53
Default
  #12
Member
 
OpenFoam
Join Date: Jun 2016
Posts: 82
Rep Power: 10
CFD-Lover is on a distinguished road
I do appreciate all your help and hospitality guys, but I am still unable to run Tobi's case for some reason.

Nails! thank you for the alternative optimizations tool, I will double check PyOpt.

Thank you all.
CFD-Lover is offline   Reply With Quote

Old   March 28, 2017, 10:20
Default
  #13
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
My case is build for FOAM-4.x. What error do you get and which tutorial did you check out?
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   March 28, 2017, 10:25
Default
  #14
Member
 
OpenFoam
Join Date: Jun 2016
Posts: 82
Rep Power: 10
CFD-Lover is on a distinguished road
I have tried to run the case "dakotaOpenFOAMCouplingSamplingLHS.tar.gz".

When I ran ./createMesh, I got the following error;

Code:
    From function blockMesh
    in file blockMeshApp.C at line 137.

FOAM exiting

   - Rotate baffles
./createMesh: line 29: system/rotateBaffles: No such file or directory
   - Adding baffles to the mesh


--> FOAM FATAL ERROR: 
Cannot find file "points" in directory "polyMesh" in times 0 down to constant

    From function Time::findInstance(const fileName&, const word&, const IOobject::readOption, const word&)
    in file db/Time/findInstance.C at line 203.

FOAM exiting

   - Flatten mesh


--> FOAM FATAL ERROR: 
Cannot find file "points" in directory "polyMesh" in times 0 down to constant

    From function Time::findInstance(const fileName&, const word&, const IOobject::readOption, const word&)
    in file db/Time/findInstance.C at line 203.

FOAM exiting

   - Extrude one patch to make a 2D mesh again


--> FOAM FATAL ERROR: 
Cannot find file "points" in directory "polyMesh" in times 0 down to constant

    From function Time::findInstance(const fileName&, const word&, const IOobject::readOption, const word&)
    in file db/Time/findInstance.C at line 203.

FOAM exiting

   - Remove not necessary boundarys


--> FOAM FATAL ERROR: 
Cannot find file "points" in directory "polyMesh" in times 0 down to constant

    From function Time::findInstance(const fileName&, const word&, const IOobject::readOption, const word&)
    in file db/Time/findInstance.C at line 203.

FOAM exiting

   - Copy 0.org to 0
rm: cannot remove ‘0’: No such file or directory
   - Renumber the mesh


--> FOAM FATAL ERROR: 
Cannot find file "points" in directory "polyMesh" in times constant down to constant

    From function Time::findInstance(const fileName&, const word&, const IOobject::readOption, const word&)
    in file db/Time/findInstance.C at line 203.

FOAM exiting
When I did ./run, I got the following error;

Code:
    From function blockMesh
    in file blockMeshApp.C at line 137.

FOAM exiting



--> FOAM FATAL ERROR: 
Cannot find file "points" in directory "polyMesh" in times 0 down to constant

    From function Time::findInstance(const fileName&, const word&, const IOobject::readOption, const word&)
    in file db/Time/findInstance.C at line 203.

FOAM exiting



--> FOAM FATAL ERROR: 
Cannot find file "points" in directory "polyMesh" in times 0 down to constant

    From function Time::findInstance(const fileName&, const word&, const IOobject::readOption, const word&)
    in file db/Time/findInstance.C at line 203.

FOAM exiting



--> FOAM FATAL ERROR: 
Cannot find file "points" in directory "polyMesh" in times 0 down to constant

    From function Time::findInstance(const fileName&, const word&, const IOobject::readOption, const word&)
    in file db/Time/findInstance.C at line 203.

FOAM exiting



--> FOAM FATAL ERROR: 
Cannot find file "points" in directory "polyMesh" in times 0 down to constant

    From function Time::findInstance(const fileName&, const word&, const IOobject::readOption, const word&)
    in file db/Time/findInstance.C at line 203.

FOAM exiting

rm: cannot remove ‘0’: No such file or directory


--> FOAM FATAL ERROR: 
Cannot find file "points" in directory "polyMesh" in times constant down to constant

    From function Time::findInstance(const fileName&, const word&, const IOobject::readOption, const word&)
    in file db/Time/findInstance.C at line 203.

FOAM exiting

   |--> Start stimulation


--> FOAM FATAL ERROR: 
Cannot find file "points" in directory "polyMesh" in times 0 down to constant

    From function Time::findInstance(const fileName&, const word&, const IOobject::readOption, const word&)
    in file db/Time/findInstance.C at line 203.

FOAM exiting

./dakota.sh: line 99: postProcess: command not found
./dakota.sh: line 101: postProcess: command not found
cat: postProcessing/Taverage/0/surfaceRegion.dat: No such file or directory
cp: cannot stat ‘constant/polyMesh’: No such file or directory
cp: cannot stat ‘clean/*’: Not a directory
(standard_in) 2: syntax error
(standard_in) 2: syntax error
   |--> Minimum Temperature at outlet is: 
   |--> Maximum Temperature at outlet is: 
   |--> Average Temperature at outlet is: 
   |--> Angle of baffle is: 
   |--> Function for dakota (Average) is: 
   |--> Function for dakota (Distribution) is: 
   |
Error(s) encountered reading results file results.out for Evaluation 1:
-- Expected 2 function value(s) but found 0.
   - DAKOTA analyzes successfully ended
I am using OpenFoam 2.3.1. Could this be the issue?

Thanks in advance,
CFD-Lover is offline   Reply With Quote

Old   March 28, 2017, 11:02
Default
  #15
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Yes, the case is build for Foam 4.x as you can see in the output of the run script.
Code:
-------------------------------------------------------------------------------
Tutorial by Tobias Holzmann
Generated October 2016  
OpenFOAM-4.x
DAKOTA
Tested with Ubuntu 16.04
Unfortunately this tutorial does not have the latest checks (like in all other tutorials). So either you switch to Foam 4.x or you have to change everything in order to use foam 2.3.1.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   March 28, 2017, 11:06
Default
  #16
Member
 
OpenFoam
Join Date: Jun 2016
Posts: 82
Rep Power: 10
CFD-Lover is on a distinguished road
Quote:
Originally Posted by Tobi View Post
or you have to change everything in order to use foam 2.3.1.
Thanks again for the quick response. With regard to the quoted sentence, what do I need to change in order to make work in version 2.3.1.

Thanks again,
CFD-Lover is offline   Reply With Quote

Old   March 29, 2017, 15:12
Default
  #17
Senior Member
 
linnemann's Avatar
 
Niels Nielsen
Join Date: Mar 2009
Location: NJ - Denmark
Posts: 556
Rep Power: 27
linnemann will become famous soon enough
Quote:
Originally Posted by akidess View Post
In your tutorial you selected NSGA2 as your optimizer - would you recommend this as a good choice for this class of problems, or did you select it without much thought put into it?
I'm not an optimization algorithm guy, but have read ok things about NSGA2.
It works fine for this problem and produced fine results.
__________________
Linnemann

PS. I do not do personal support, so please post in the forums.
linnemann is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to contribute to the community of OpenFOAM users and to the OpenFOAM technology wyldckat OpenFOAM 17 November 10, 2017 16:54
OpenFOAM for subsurface flow, or coupling with a subsurface flow code? chljl OpenFOAM Running, Solving & CFD 0 February 14, 2012 20:38
New OpenFOAM Forum Structure jola OpenFOAM 2 October 19, 2011 07:55
Modified OpenFOAM Forum Structure and New Mailing-List pete Site News & Announcements 0 June 29, 2009 06:56
coupling OpenFOAM with other programs Martin123 OpenFOAM Running, Solving & CFD 3 June 3, 2009 19:13


All times are GMT -4. The time now is 15:48.