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

2D FSI optimisation - history_direct.csv not found

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 2, 2020, 12:23
Default 2D FSI optimisation - history_direct.csv not found
  #1
New Member
 
Michalis Hadjiandreou
Join Date: Feb 2020
Posts: 3
Rep Power: 3
michalish is on a distinguished road
Dear Community,

I have been trying lately to set up and run a shape optimisation for NACA0012 airfoil. After setting up the fluid and structure meshes, I created two sub-configure files (configFLOW.cfg and configFEA.cfg) and a main one (config.cfg)

It was found after a few trials that it was better to combine the two meshes and enable
Code:
MULTIZONE_MESH = YES
.

My question arises after I try running:
Code:
$ python3 $SU2_RUN/shape_optimization.py -g DISCRETE_ADJOINT -f config.cfg -z 2 -o SLSQP
I receive the following error
Quote:
Traceback (most recent call last):
File "/usr/local/bin/shape_optimization.py", line 176, in <module>
main()
File "/usr/local/bin/shape_optimization.py", line 108, in main
options.nzones )
File "/usr/local/bin/shape_optimization.py", line 152, in shape_optimization
SU2.opt.SLSQP(project,x0,xb,its,accu)
File "/usr/local/bin/SU2/opt/scipy_tools.py", line 133, in scipy_slsqp
epsilon = eps )
File "/home/michalish/anaconda3/lib/python3.7/site-packages/scipy/optimize/slsqp.py", line 208, in fmin_slsqp
constraints=cons, **opts)
File "/home/michalish/anaconda3/lib/python3.7/site-packages/scipy/optimize/slsqp.py", line 315, in _minimize_slsqp
for c in cons['ineq']]))
File "/home/michalish/anaconda3/lib/python3.7/site-packages/scipy/optimize/slsqp.py", line 315, in <listcomp>
for c in cons['ineq']]))
File "/usr/local/bin/SU2/opt/scipy_tools.py", line 457, in con_cieq
cons = project.con_cieq(x)
File "/usr/local/bin/SU2/opt/project.py", line 253, in con_cieq
return self._eval(konfig, func,dvs)
File "/usr/local/bin/SU2/opt/project.py", line 202, in _eval
vals = design._eval(func,*args)
File "/usr/local/bin/SU2/eval/design.py", line 147, in _eval
vals = eval_func(*inputs)
File "/usr/local/bin/SU2/eval/design.py", line 520, in con_cieq
func = su2func(this_con,config,state)
File "/usr/local/bin/SU2/eval/functions.py", line 92, in function
aerodynamics( config, state )
File "/usr/local/bin/SU2/eval/functions.py", line 254, in aerodynamics
info = su2run.direct(config)
File "/usr/local/bin/SU2/run/direct.py", line 99, in direct
history = su2io.read_history( history_filename , config.NZONES)
File "/usr/local/bin/SU2/io/tools.py", line 148, in read_history
plot_data = read_plot( History_filename )
File "/usr/local/bin/SU2/io/tools.py", line 77, in read_plot
plot_file = open(filename)
FileNotFoundError: [Errno 2] No such file or directory: 'history_direct.csv'
From my understanding the code initially runs the direct solver in order to calculate the sensitivities afterwards. However during this process it creates two history files for each zone independently (i.e. history_direct_0.csv and history_direct_1.csv). Note that the "_direct" suffix is added automatically through the code. Despite this, I also specify a
Code:
CONV_FILENAME = history
in the main config file. So since the number of zones is specified in the shape optimisation command why isn't the read_history() and read_plot() functions within tools.py not read discretely the history of these two files? Additionally, I cannot find a way to create a universal history_direct.csv within /DESIGNS/DSN_001/DIRECT folder from which the read_history() and read_plot() will read the history.

I have tried to modify the "filename" from read_plot() function to "history_direct_0.csv" and the code runs but obviously when it is required to process structural data (zone1) it cannot find any since i forced it to read only history of the fluid domain.

I am a fairly new user to SU2 and most probably there is a silly mistake done from my part somewhere therefore any sort of advice would be greatly beneficial. I have also attached all config (in .txt form so just save them as .cfg when downloaded) and mesh file ( https://drive.google.com/open?id=1qY...fQvtDnHNpd3-cK ) if anyone is interested to run my case. Thank you in advance and looking forward for your reply!
Attached Files
File Type: txt config .txt (10.8 KB, 1 views)
File Type: txt configFLOW.txt (12.4 KB, 2 views)
File Type: txt configFEA.txt (10.8 KB, 1 views)
michalish is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
[Other] Mesh Importing Problem cuteapathy ANSYS Meshing & Geometry 2 June 24, 2017 05:29
[Other] Compiling hacFoam (Ubuntu 10.04)(OF2.0.0)(LAMMPS13Jul2010)) Henrik_E OpenFOAM Installation 3 September 29, 2016 16:16
dsmcInitialise - dsmcFoam archymedes OpenFOAM Pre-Processing 94 July 15, 2016 16:14
missing vtf3.h BPatch.h papi.h linch OpenFOAM Installation 41 July 24, 2012 14:45
critical error during installation of openfoam Fabio88 OpenFOAM Installation 21 June 2, 2010 03:01


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