Jump to content
Mr. Md Shahriar Nizam

Connect fortran code for optimization

Recommended Posts

Hello friends,

 

I was very eager to connect the framework with a optimization subroutine(written in fortran) but unfortunately i dont know how to do it. Can anybody give me any suggestion or any tutorial for doing that.

 

Thank you,

Shahriar

Share this post


Link to post
Share on other sites

Hi Shahriar

 

First of all, we need to clarify the input and output features. Please give us some more detailed information about them.

 

[input files] - [executables] - [output files]

 

--

Daehwan.

Share this post


Link to post
Share on other sites

Hello Daehwan,

Thank you for your reply.

I am not sure about this matter. But i am trying to give you detail description of my plan. I want to make a set of hulls from the parametric design procedure given in framework. After that i will try to optimize the ship hull from the basis of wave making resistance or drag force. For doing this if i have fortran code for  calculating wave making resistance or drag force and fortran code for a optimization procedure like(gradiend method or monte carlo), then how can i connect these fortran codes with frame work for getting the optimum value.

 

                                                                                            |-----------------------------|

As an example, input(parametric ship hull)----(optimization subroutine)---(resistance calculation)-------optimize value.

 

May be it is not clear yet.

If not then can you please give me some idea about doing optimization in framework. I have already gone through the tutorials.

 

Thank you,

Shahriar 

Share this post


Link to post
Share on other sites

The procedure seems understood like this.

 

Step 1. FFW exports hull form variants.

Step 2. A code calculates wave resistance.

Step 3. A code evalutates the minimum resistance.

Step 4. If this procedure did not stop at step 3, step 1 starts again.

 

The software connection chain for the two external programs are possible when they run under batch mode.

The actual matter is that CAESES demo version does not provide more than 3 or 4 variants.

 

If you are a student, you could have chance to experience full optimization with the combination of FFW and your in-house code.

Please read the "Free Academic Pro Edition for Students" in the linked page below :

 

http://www.friendship-systems.com/products/friendship-framework/licenses

 

If you are not a student, please make a contact with support@friendship-systems.com to be guided.

 

Best regards

Daehwan

Edited by Mr. Arne Bergmann
CAESES is not a "demo" version but a full working version (with some limitations compared to the pro edition)

Share this post


Link to post
Share on other sites

Hi Shahriar,

 

Have you checked the samples and tutorials which are shipped with CAESES yet?

Please open the Documentation Browser and move to tab "Tutorials". In section "Getting Started" is a good explanation of how to couple codes with CAESES. Name of the tutorial is "External Software".

There are also some samples which demonstrate the coupling of external software and CAESES. Please see section "Integration" of the samples tab.

 

I hope the tutorial(s) will give you an idea of how it works in general.

But of course, every optimization task is different, so don't hesitate if you have further questions.

 

Cheers

Ben

Share this post


Link to post
Share on other sites

HI Shahriar,

 

If I understand you correctly you are asking if you can use your own optimization routine driving the process, right?

CAESES is not meant to work as part of an optimization loop. If you want to do optimization in any way, you should strive for a commercial or a students license (whatever is applicable).

 

Best regards

Claus

Share this post


Link to post
Share on other sites

Hello Claus,

 

At first thank you for you mail.

 

Then it has been a long time since i mailed you. Actually i was making ship model by using framework. Although i need to learn about the process of making feature definition. 

 

Yes you are right. I want to run my own optimization routine in framework.

1) is it possible to use my own optimzation code(fortran) in framework.

2) I do have a student license and a (may be commercial) license in our university lab.

3) The way i think about the optimization:

i will have a code for optimization. I will have to give the number of variables and limiting values for the variables. Optimization code will make some value for these variables and by using the values we will have to make the ship hull. Later we can calculate resistance(as an example) for that ship and based on that result the code will make another set of data. By using the data we will have a ship hull again then resistance....it will work till a certain  limit.

 

That means there will be three part...

i) Opmitization code(input will be number of variable and limit of the variables....output will be value in between the limit)

ii) Hull generation(input will be the values in between the limit and output will be the ship hull)

iii)Resistance calculation(it can be any thing) (input will be the ship hull and output will be the resistance)

 

i do have code for i) and iii).

I want to connect these with hull generation part.

Is it possible in framework.

 

 

I have found that in framework there is some way to transform a ship into a parametric ship form. I do have some idea about this matter. And again we can change the value of the parameters for making different ship hull. 

 

So i was thinking to connect i) and iii) with this parametric ship hull. As a result i could have get very fine ship hull from the limiting values of the parameters and after that i could have use the hull information for the resistance calculation.

 

Very eager to get your comment about the issue.

 

Thank you for reading this long message. If you need any other information please let me know that.

 

Best regards,

Shahriar 

 

***** Thank you Ben and Daehwan ****

 

 

 

 

Share this post


Link to post
Share on other sites

Hey Shariar,

 

Yes this is possible if you have an academic or commercial license. See Daehwan's post.

Have you seen this post from Jörg? He provided a batch mode setup with FFW.

 

For your setup:

 

Step i) creates the values for the design variables

step ii) start FFW in batch mode and it will generate the geometry (STL/IGES or every other supported export type)

step iii) Resistance will be calculated based on the former created geometry file.

 

Take a look at the sweep duct setup and do not hesitate to post your questions.

 

Cheers,

 

Karsten

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...