CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

CFD Codes and GUI

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 2 Post By ganuganu

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 20, 2019, 07:34
Smile CFD Codes and GUI
  #1
New Member
 
Ganesh kumar
Join Date: May 2013
Location: India
Posts: 15
Rep Power: 12
ganuganu is on a distinguished road
Send a message via Skype™ to ganuganu
Hello all,

I would like to share the videos of my code run here. For more than 8 months (I know i took long time, have to manage my work life as well) I have been working in creating these codes. I am happy to be sharing the results, here are some videos,

Code details:
1. Compressible NS equations
2. Coupled method
3. 1st order and 2nd order
4. Flux limited approach and MUSCL approach
5. Minmod, Koren, Superbee and Sweby limiters are used
6. Inviscid, laminar and Turbulent flow regimes
7. Low Y+ formulation
8. Overset method (For now stationary and translational motion only)
9. H-CUSP, HLL, HLLC, Steger warming, Van Leer FVS, ROE FDS, AUSM, AUSM+ , AUSM+ -up, MacCormack and LaxWendroff.
10. Finite difference method, extending to finite volume method
11. Explicit method RK4

GUI: user interface is created using Qt application. Complete C++ (GUI and run)

This is my first ever code (when i started learning numerical coding):
Maccormack scheme flow past cylinder: https://www.linkedin.com/feed/update...90615974387712
Maccormack scheme with artificial diffusion Lid driven cavity:https://www.linkedin.com/feed/update...55917665931264

Improved codes:
Overset mesh:https://www.linkedin.com/feed/update...75944985640960
Steger warming scheme flowpast square:https://www.linkedin.com/feed/update...58537704255489
Steger warming with Wilcox K omega:https://www.linkedin.com/feed/update...99763697721344
AUSM+ mach 1.45:https://www.linkedin.com/feed/update...83210220761088
ROE FDS mach 1.45:https://www.linkedin.com/feed/update...14369600749568

Similar videos goes for HLL, H-CUSP, HLLC, AUSM and Van Leer FVS. Currently I am creating a GUI where i implement all the above mentioned physics. Still it is under progress but you can download the conceptual GUI here,
https://sites.google.com/view/cgflow/home

Also I am extending the GUI with MPI capabilities. I am able to perform MPI with a script application but not sure how to segregate the GUI and MPI process. If anyone could provide me suggestions on how to get started with MPI (With GUI), it will be of great help.

Thank you all

Regards
Ganesh
lucamirtanini and canalpk like this.
ganuganu is offline   Reply With Quote

Old   July 20, 2019, 16:28
Default
  #2
Senior Member
 
andy
Join Date: May 2009
Posts: 269
Rep Power: 17
andy_ is on a distinguished road
Quote:
Originally Posted by ganuganu View Post
Also I am extending the GUI with MPI capabilities. I am able to perform MPI with a script application but not sure how to segregate the GUI and MPI process. If anyone could provide me suggestions on how to get started with MPI (With GUI), it will be of great help.
MPI is designed to be the interprocess communication for a solver running on some remote number crunching parallel processing machine. Conventionally this is a non-interactive batch process. Do you want your GUI to interact with the remotely running MPI solver? If so, what type of information do you want to exchange? Or are you asking how to serialise the data? Or something else?
andy_ is offline   Reply With Quote

Old   July 21, 2019, 09:40
Default
  #3
New Member
 
Ganesh kumar
Join Date: May 2013
Location: India
Posts: 15
Rep Power: 12
ganuganu is on a distinguished road
Send a message via Skype™ to ganuganu
Quote:
Originally Posted by andy_ View Post
MPI is designed to be the interprocess communication for a solver running on some remote number crunching parallel processing machine. Conventionally this is a non-interactive batch process. Do you want your GUI to interact with the remotely running MPI solver? If so, what type of information do you want to exchange? Or are you asking how to serialise the data? Or something else?
I want my GUI to run separately but at a definite amount of time interval the data from the solver must be acquired by GUI to update the scalar plots and 2d line plots. Datas are engineering quantities like pressure, temp and velocity.

On searching the internet I got an example of running a heat equation in MPI but it is just a c++ script which i could run in cmd with "exe -n 2 filename" with this command. When i try to do the same with GUI it opens multiple GUI for the no: of processor i am specifying in the command. How can I segregate the GUI part from solving part? Should I go with multi threading or anything else. Thank you for your reply.

Regards
Ganesh
ganuganu is offline   Reply With Quote

Old   July 21, 2019, 15:49
Default
  #4
Senior Member
 
andy
Join Date: May 2009
Posts: 269
Rep Power: 17
andy_ is on a distinguished road
Quote:
Originally Posted by ganuganu View Post
I want my GUI to run separately but at a definite amount of time interval the data from the solver must be acquired by GUI to update the scalar plots and 2d line plots. Datas are engineering quantities like pressure, temp and velocity.
You could use MPI for this but it is perhaps more usual to use a one of the more common interprocess communication (IPC) mechanisms.

Quote:
Originally Posted by ganuganu View Post
On searching the internet I got an example of running a heat equation in MPI but it is just a c++ script which i could run in cmd with "exe -n 2 filename" with this command. When i try to do the same with GUI it opens multiple GUI for the no: of processor i am specifying in the command. How can I segregate the GUI part from solving part? Should I go with multi threading or anything else. Thank you for your reply.
This seems confused. C++ is not a scripting language it is compiled. I know nothing about whatever program you have found. Multithreading is quite different to communicating MPI processes.

Typically what is done with MPI processes is to assign part of the computational grid to each solver process. Your GUI, it if has enough memory, could do the splitting and send the relevant grid and field parts to the relevant solver process and receive them back at regular intervals to assemble and plot. This is a common master-slave configuration with your GUI as master and the solvers as slaves. There are lots of examples with this very common configuration.

I am still not sure I have grasped the difficulty you are seeing. Are you intending to run on a computer with shared memory or distributed memory?
andy_ is offline   Reply With Quote

Old   July 21, 2019, 22:09
Default
  #5
New Member
 
Ganesh kumar
Join Date: May 2013
Location: India
Posts: 15
Rep Power: 12
ganuganu is on a distinguished road
Send a message via Skype™ to ganuganu
Quote:
Originally Posted by andy_ View Post
This seems confused. C++ is not a scripting language it is compiled. I know nothing about whatever program you have found. Multithreading is quite different to communicating MPI processes.

Typically what is done with MPI processes is to assign part of the computational grid to each solver process. Your GUI, it if has enough memory, could do the splitting and send the relevant grid and field parts to the relevant solver process and receive them back at regular intervals to assemble and plot. This is a common master-slave configuration with your GUI as master and the solvers as slaves. There are lots of examples with this very common configuration.
I know the basic MPI master/slave concept and the division of mesh grid/solving. The script which i referred is here http://people.math.sc.edu/Burkardt/c...i/heat/heat.cc This is a c++ heat equation with OpenMPI libraries.

I am not sure how to specify the following,
1. If the node id is "0" only in that ID the GUI must start. Now what is happening is if I specify -n 3 three GUI's are opened. How can i overcome this?

I have already ran the script alone without GUI using OpenMPI libraries so no issues with implementing the MPI methods/libraries.
ganuganu is offline   Reply With Quote

Old   July 22, 2019, 06:02
Default
  #6
Senior Member
 
sbaffini's Avatar
 
Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 2,152
Blog Entries: 29
Rep Power: 39
sbaffini will become famous soon enoughsbaffini will become famous soon enough
Send a message via Skype™ to sbaffini
MPI is about running n different processes and let them communicate. But nothing is said about where and what this processes are running. So that, in principle, you can launch two completely different applications with it, even written with different languages, but you need to have a complete understanding of MPI in order to correctly use it.

Take a look, for example, at this:

https://github.com/plampite/vtkForMPI

It is a server-client example. The server is written in C++ and works as visualization server. The client is written in Fortran and works as client.

If I had to write a GUI linked to the solver I would pick the opposite way, making the GUI the client and the solver the server providing the data for the visualization in the GUI. But this is just a way among many others.

Yet, to be honest, I think you first need to figure out the MPI implementation on the solver side before going into more fancy stuff.
sbaffini is offline   Reply With Quote

Old   July 22, 2019, 06:50
Default
  #7
Senior Member
 
andy
Join Date: May 2009
Posts: 269
Rep Power: 17
andy_ is on a distinguished road
Quote:
Originally Posted by ganuganu View Post
I am not sure how to specify the following,
1. If the node id is "0" only in that ID the GUI must start. Now what is happening is if I specify -n 3 three GUI's are opened. How can i overcome this?
I am still not really seeing your problem. The code you linked to is for the slave processes. The master process would not normally take part in the number crunching but could if you wanted. The problem with the master joining in is that the overall speed of the computation is determined by the slowest process and so if the master is also performing assembly and GUI operations all the other processes will stop and wait for it.

Can I repeat my question about distributed and shared memory and how you intend to run your parallel processing. MPI would not typically be used if you run all the processes on your workstation which, at a guess, you would seem to be doing if lots of GUIs start up. Typically the master would run on a front end node with disks and external connections to the outside world and the slaves would run on computational nodes with little or no disks and only fast internal MPI connection hardware. The front end node could be your workstation but is more usually remote along with the computational nodes. The GUI would run on your workstation and send grid and fields to the master or directly to the slaves depending on how your hardware and software is arranged. I will skip job scheduling software.

If you want an example look at how plotting software like paraview, visit and the like can interact with running parallel processing programs.
andy_ 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
free GUI based CFD software devalvyas Main CFD Forum 3 June 15, 2016 14:18
CFD Survey extended. Free software. Don Main CFD Forum 1 January 20, 2006 14:04
CFD Survey. Free software Don Main CFD Forum 5 January 20, 2006 14:00
cfd free/shareware clifford bradford Main CFD Forum 6 May 7, 1999 05:11
public CFD Code development Heinz Wilkening Main CFD Forum 38 March 5, 1999 11:44


All times are GMT -4. The time now is 13:22.