|
[Sponsors] |
[Gmsh] Editing .geo file to be used with DAKOTA! |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
June 4, 2017, 23:14 |
Editing .geo file to be used with DAKOTA!
|
#1 |
Member
OpenFoam
Join Date: Jun 2016
Posts: 82
Rep Power: 9 |
Hi,
I am following some examples on how to couple DAKOTA with OpenFoam. The examples were created by Wolf-Dynamics. I have noticed that most of the examples deal with SnappyHEX mesh only. However, I have come to a mesh that is created with gmsh. The mesh has one design variable that I wish to be changed through the optimization process. For instance, Code:
D = 5; // Diameter h = 0.1*D; // Theta = 4;// Thanks in advance for you kind help. Regards, |
|
June 5, 2017, 01:33 |
|
#2 |
Member
OpenFoam
Join Date: Jun 2016
Posts: 82
Rep Power: 9 |
Ok.
I put the geo file in the templatedir and named it geo.template putting theta={x1}. In the simulator_script file, I used; Code:
dprepro $1 geo.template geo.in Code:
Point(1) = {-7.5*D, 10*D, 0, 0}; Point(2) = {12.5*D, 10*D, 0, 0}; Best, |
|
June 5, 2017, 02:05 |
|
#3 |
Member
OpenFoam
Join Date: Jun 2016
Posts: 82
Rep Power: 9 |
Alright, the problem is solved by simply changing the dprepro file to the following ;
Code:
# default delimiters are curly braces { } my $ld = "\{"; my $rd = "\}"; Code:
# default delimiters are curly braces { } my $ld = "\{{"; my $rd = "\}}"; Best, |
|
April 29, 2020, 01:32 |
Regarding the .geo file and the dprepo
|
#4 |
New Member
Edwin Rajeev
Join Date: Dec 2019
Location: Florida
Posts: 14
Rep Power: 6 |
Hi I came across this post and this is the only one of the kind. Could you possibly upload the case setup directory if you still probably have it?
I was facing issues doing this and for some reason the .geo file is not being modified. Thanks in advance |
|
April 29, 2020, 11:23 |
Solved it
|
#5 |
New Member
Edwin Rajeev
Join Date: Dec 2019
Location: Florida
Posts: 14
Rep Power: 6 |
wrote a python code to modify the gmsh file. and dprepo modified the the variable within the python code.
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
how to calculate mass flow rate on patches and summation of that during the run? | immortality | OpenFOAM Post-Processing | 104 | February 16, 2021 08:46 |
[swak4Foam] Problem installing swak_2.x for OpenFoam-2.4.0 | towanda | OpenFOAM Community Contributions | 6 | September 5, 2015 21:03 |
[OpenFOAM.org] Compile OF 2.3 on Mac OS X .... the patch | gschaider | OpenFOAM Installation | 225 | August 25, 2015 19:43 |
centOS 5.6 : paraFoam not working | yossi | OpenFOAM Installation | 2 | October 9, 2013 01:41 |
DxFoam reader update | hjasak | OpenFOAM Post-Processing | 69 | April 24, 2008 01:24 |