Kratos files - embedded solver

Moderator: GiD Team

Post Reply
Gandhal
Posts: 2
Joined: Thu Oct 29, 2015 2:42 pm

Kratos files - embedded solver

Post by Gandhal »

Hello,

I am using Kratos with GiD for a CFD application of flow around membranes. I have two questions, if anybody can help I would really appreciate it.

- Can I retrieve the Kratos .h, .cpp and .py files if I create the problem with GiD and import the Kratos problem type?
- How can I implement the embedded solver of Kratos through GiD? Is there any documentation on this method?

Thank you very much!
Apostolos
User avatar
escolano
Posts: 1918
Joined: Sun Sep 05, 1982 10:51 pm

Re: Kratos files - embedded solver

Post by escolano »

I have not exactly understood your questions, but I will try to clarify concepts.

Kratos is an source multiphysic FEM code, the source code (.h, .cpp, .py) could be download from his webpage
http://www.cimne.com/kratos

It is possible to get some compiled version of Kratos, including its GiD problemtype (te be used using GiD as GUI for pre/postprocessor), from the GiD menu
Data->Problem type->Internet retrieve...
(there are versions for Windows x32, x64 and Linux x64)
This download is for final users, it doesn't include the source code of Kratos.

If you are an advanced Kratos used that is compiling Kratos and programming it (at C++ low level or Python hight level) then you could use your own version kratos with the 'GiD problemtype' copying the appropiated files to the ...\problemtypes\kratos.gid folder of GiD.
Kratos themselve is executed when pressing 'calculate' in GiD through the file kratos.unix.bat (kratos.win.bat on Windows platforms), probably simply editing this file you could run your own copy of kratos.
I am not expert on kratos, but I think that Kratos run starting its own copy of a Python interpreter, and load in this interpreter the kratos functions in order to be used at high level with a python script.
Gandhal
Posts: 2
Joined: Thu Oct 29, 2015 2:42 pm

Re: Kratos files - embedded solver

Post by Gandhal »

Thanks for the swift answer!

Even though I am new to both GiD and Kratos, your 'advanced' answer was closer to what I was asking for! Yes, by .h and .cpp files I was referring to the ones advanced users create to run their simulations. I would assume that since I am doing this from inside GiD, the program would implicitly create them for me, but this doesn't seem to be the case. Is there a way to generate these files from a case built in GiD? Or the other way around, if I create a Kratos case by programming, how do I import/visualize it with GiD? (I think you sort of answered this already, but I don't think I got it exactly :( )

I suppose my other question about the embedded solver for fluids is not for this forum?
User avatar
escolano
Posts: 1918
Joined: Sun Sep 05, 1982 10:51 pm

Re: Kratos files - embedded solver

Post by escolano »

GiD doesn't know nothing about Kratos, and won't write any .cpp/.h code.

kratos.gid is a problemtype that customize GiD for Kratos use.

The idea is that kratos.exe of the kratos.gid problemtype must not be re-compiled for each case.
GiD provides the geometry, mesh and boundary conditions in a file (.mdpa for kratos), the run kratos and it write some .post.res results file with GiD format to be visualized in GiD postprocess.

If you are developing your own version of Kratos to do new features, then you could run it from inside GiD (kratos.linux.bat problemtype file, modifying it to point your version) or run it without GiD in a external console with the .mdpa file as input.

About the other question 'about the embedded solver for fluids', as you said must not be asked in this GiD forum.
Have a look to the Kratos wiki: http://kratos-wiki.cimne.upc.edu/index.php/Main_Page.
Its main page has link to a 'kratos mailing list', you can try asking there.
Post Reply