|
[Sponsors] |
May 11, 2016, 10:54 |
Working with CFX from command line
|
#1 |
Member
Jack
Join Date: May 2015
Posts: 98
Rep Power: 11 |
Hello,
I am about to start working with a computing cluster to speed up my CFD simulations. I am familiar with working with OpenFoam, and since this has no GUI, it would be relatively easy to make the jump from my computer to cluster. However I am stuck with using CFX as my solver and so I need some help understanding what to expect. There are a few things I wonder about: 1) How does one mesh the geometry (I use turbogrid or icem) from a command line? or is it common to do meshing on a workstation and then copy the mesh file over to your cluster directory? 2) What about setting up the case? From what I understand, the bare minimum you need to run a CFX run is to a have a <filename.def> file and then invoke Code:
cfx5solve -def <filename.def> & 3) Im also wondering what the usual way to monitor residuals and selected variables. Im guessing these are output in the .out file and so I guess I could write a python/matlab script to read from the file and plot the residuals? Is this the preferred method? 4) What do I need to do if I want to pause the simulation and look at the results in paraview? I can interrupt the current simulation using Code:
cfx5stop -directory <filename.dir> and in the GUI for CFX solve, you can choose to export results to Ensight format (which is needed for paraview). How would I do this from the command line? |
|
May 11, 2016, 11:04 |
|
#2 |
Senior Member
Maxim
Join Date: Aug 2015
Location: Germany
Posts: 413
Rep Power: 13 |
have a look in the documentation - all commands are explained there.
1) never tried that - sorry 2) I always used Pre to create def files - not sure if you can do that via command line 3) missing 4) you can open solver manager and check your monitors for any running or completed calculation. For running simulations, you need to direct solver manager to the .dir folder. If you are only interested in the out-File, you can "tail" the out-file in your command line application. Unix can do that with the standard apps, for windows, you will need to install one of the many (free) console apps. 5) you can stop it with the command you mentioned, or directly from the solver manager with the STOP button. continue with Code:
-cont-from-file |
|
May 11, 2016, 11:11 |
|
#3 |
Member
Jack
Join Date: May 2015
Posts: 98
Rep Power: 11 |
Hello Maxim, thank you for your response.
4) What is this solver manager? It sounds like a GUI application, so I wouldn't be able to open that I think. Can you give an example of the tail functionality? 5) How can I view the current results in paraview? |
|
May 11, 2016, 11:26 |
|
#4 |
Senior Member
Maxim
Join Date: Aug 2015
Location: Germany
Posts: 413
Rep Power: 13 |
I thought you worked with OpenFOAM before and you would know the tail command from unix/linux. Google it.
With that command you will see the stuff that is written to the out-file in your command line in real time. Yes, SolverManager is part of the Ansys Toolbox and basically the GUI of the solver. You can display all monitors and the out-file. You already asked here about ParaView... |
|
May 11, 2016, 11:32 |
|
#5 |
Member
Jack
Join Date: May 2015
Posts: 98
Rep Power: 11 |
I see, I think I misunderstood you. Im fine with seeing the data that is printed out, I was just wondering if the preferred way of plotting the residuals is to read through the .out file and plot from there or if that is unnecessary.
As for the paraview question, yes I can export the results from the GUI in the cfx solver, but I don't have access to the GUI and I want to do everything from the terminal with some simple commands. After I have completed my simulation I will have a lot of data, and I don't want to have to move this around to a place where I can export it to the Ensight format, only to have to move it back for post processing. I hope this makes sense. |
|
May 11, 2016, 13:02 |
|
#6 |
Senior Member
Join Date: Jun 2009
Posts: 1,880
Rep Power: 33 |
My advice is to rethink your approach. Following an established approach for another software may not be very efficient for a different software.
You can rethink a new approach from your old approach as long as you do not stick to the details, but to the high level steps. For example, you are used to "vi MyOpenFoamCase", then read the CFX documentation about how you can script the creation of a definition file. It does not have to be "vi". CFX provides what is a "session file" that you can create once by recording your steps through the user interface, and later modify using "vi" and the documentation for example. The solver manager user interface can be run from a computer different from the cluster as long as you have read access to the directory where the data is being stored. There will be no load on the cluster, and it will save you a ton of time to get from point A (setting up the case) to point B (obtain meaningful engineering results) Good luck, |
|
May 11, 2016, 14:15 |
|
#7 |
Member
Jack
Join Date: May 2015
Posts: 98
Rep Power: 11 |
Hi Opaque,
Thank you that is exactly the advice I needed. I have only one worry left, and that is the post processing part of the results. I need to use paraview for this and I am worried that when dealing with large result files of unsteady simulations, it won't make sense or will be very time consuming to convert from the ansys format to ensight/vtk. Do you have any understanding of whether this would be prohibitive or not? |
|
December 27, 2018, 21:15 |
|
#8 | |
Member
Soumitra Vadnerkar
Join Date: Aug 2018
Posts: 70
Rep Power: 8 |
Quote:
I am also interested in viewing the .out file for residuals changing dynamically. What can be done to do so? |
||
December 27, 2018, 21:56 |
|
#9 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,871
Rep Power: 144 |
You can simply view the output file at any time, it is just a text file. Just do a tail ***.out if you only want the latest stuff.
Or are you looking for the residuals so you can plot them? If so then just view it in Solver Manager and all the solver variables are plotted there. If for some reason I do not understand you want to plot them yourself rather than use Solver Manager then have a look in the temporary run directory and you will find a text file with the residuals (and all other solver variables) in a comma delimited text file.
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum. |
|
December 27, 2018, 22:15 |
|
#10 | |
Member
Soumitra Vadnerkar
Join Date: Aug 2018
Posts: 70
Rep Power: 8 |
Quote:
Yes, I get your point. To see the plots, which a graphical task, I would need to look into Solver Manager. Anyway, I was looking for at least viewing the residuals (not the plots) as they appear in the Solver Manager window on the right side in the terminal window (which doesn't require GUI related X-server). As this is dynamic task, I don't know how to see the ever changing .out file in terminal. Need help if there is any linux command for that. Also, can you please elaborate more on what you said about 'tail ***.out'? |
||
December 27, 2018, 22:20 |
|
#11 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,871
Rep Power: 144 |
Want to know about the linux command "tail"? Then type "man tail". You can look up the documentation for any linux command with "man".
For your text viewer search the web for a suitable viewer. I suspect ones like emacs and probably even vi could do it, when set up properly.
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum. |
|
Tags |
ansys, cfx, command line |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
CFX Pre & Post Startup Error | vigges | CFX | 12 | March 17, 2023 04:30 |
CFX vs. FLUENT | turbo | CFX | 4 | April 13, 2021 09:08 |
error about fsi in CFX and ANSYS | WANGFIRE | CFX | 1 | April 21, 2015 02:48 |
Differences between CFX and OpenFOAM regarding convergence and robustness! | magjohan | OpenFOAM Running, Solving & CFD | 4 | February 26, 2015 11:26 |
CFX 10's solutions differ from CFX 5.7's | Atit Koonsrisuk | CFX | 4 | July 26, 2006 12:59 |