CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   CFX (https://www.cfd-online.com/Forums/cfx/)
-   -   How to Write .def file from mesh file and ccl file? (https://www.cfd-online.com/Forums/cfx/200908-how-write-def-file-mesh-file-ccl-file.html)

evcelica April 16, 2018 14:35

How to Write .def file from mesh file and ccl file?
 
Greeetings,

Sometimes, for very large assemblies, CFX can be extremely slow, as we all know. I'm wondering if there is a way to write a .def file without opening Pre?

I have a mesh file with all boundaries, and subdomains being named selections. (.cmdb file)

I also opened up a simplified version of the mesh in CFX Pre, and made all my boundary conditions and subdomins, calling out those named selections. I exported that .ccl file.

Is there a way to write a .def file from the mesh and ccl files?

I did some searching and found this, which says it may be possible:
http://www.eureka.im/3852.html
But I guess I don't know the correct format or something, because I can't get it to work.
Does anyone know if this is possible?
This would help a lot for large cases when CFX-Pre is very slow!

Thanks in advance,
Erik

ghorrocks April 17, 2018 00:11

I have looked into this before and never got anywhere. I gave up and decided that you needed CFX-Pre.

The link you posted still uses CFX-Pre, just starting it from the command line and not running the GUI. There can be considerable overhead in the automatic interface detection in the GUI, and smaller overheads in displaying the GUI, so this approach should avoid these overheads.

evcelica April 17, 2018 07:21

Thanks for the response Glenn.
I cannot get that approach I posted to work. I'm sure I just don't know the correct syntax for the command lines. Do you understand these commands? It Looks like in those instructions, there is a lot of additional info left out for properly formatting the commands.
Or are you saying you never got anything like that to work?

WOW!!!
I just stumbled across something great!
My assembly was huge (thousands of bodies) just because I slice up the geometry so I can mesh it very nicely. It is all these bodies which cause CFX to be slow (even though they are 1 part). I just exported the mesh to fluent mesh (.msh file) and imported it into CFX Pre. All the separate bodies are now gone, and merged into only a few bodies, split by my "names selections" that I care about. I've looked into merging the mesh before, and never got anywhere, so I gave up. But exporting to Fluent mesh worked great, and it does exactly what I wanted it to. Also CFXPre is super fast!!!
I will be exporting to Fluent mesh with everything from now on, no need to write the .def file without CFXPre GUI now!

ghorrocks April 17, 2018 07:33

You can control CFX-Pre using CCL as your link states. I have never done it that way. But CFX-Pre supports session files, and these are simple to get started with as you can just record one doing the actions you want to automate. Then you can use command line arguments to start CFX-Pre to run your session file but not fire up a GUI.

evcelica April 17, 2018 08:13

I edited my last post, probably after you responded. But still, the Fluent mesh is working great. I was just waiting for something to not work because it seemed too good to be true. But it is solid as a rock and very quick! CFXPre will never be a drag again using this mesh export.
I'm sure CFD post is going to be much faster now as well.

evcelica April 17, 2018 08:36

Further examination: The solver is also 3 times faster now. I didn't expect that! There must have been huge overhead is just having that many bodies? Even though they were in the same domain, and all 1 part?

Gert-Jan April 17, 2018 08:48

I really wonder how your geometry and domain setup looks like. I have never noticed anything like this, or Pre being slow. And that a workaround using a fluent export solves a problem......

Can you shed a light? Where does you geometry and mesh come from?

evcelica April 17, 2018 09:00

1 Attachment(s)
I created the geometry in design modeler. Then I sliced it up into ~10000 bodies so that I could have a perfectly orthogonal swept mesh everywhere. I then "created part" from all the sliced up bodies. Meshed in ANSYS Mesh.
Here is the coarse mesh (you can barely see the fine mesh), and geometry once I bring it into CFX Pre using the Fluent Mesh. See how it merges the bodies, except for my names selections, which it keeps separate.
CFXPre is always slow when I have thousands of bodies. I didn't know a way around this until now.

This is a Liquid Argon Cryostat.
I'm trying to calculate the temperature distribution, fluid velocity, and impurity field of the liquid argon. We want the temperature and impurities as uniform as possible throughout the field cage volume. Then calculate the space charge distribution inside the electric field cage from positive ions which are generated from cosmic rays and drift @ 1mm/s relative to the fluid flow from the anode to the cathode plane, for every 40 V/cm of electric field potential.
The geometry was giving me way more problems than the physics....not anymore it seems.

Opaque April 17, 2018 15:01

Have you tried the following ?

Open CFX-Pre
Edit Options
Go to CFX-Pre/General/Beta Options/Topology Beta Features

There are two options:

Enable Simplification on Load and Import
Enable Simplification on Write

Those options should have similar behavior (merging/gluing pieces/bodies) as you described using Fluent import/export.

Hope it helps,

evcelica April 17, 2018 16:29

I will try that as well and see how it does. The Fluent thing works great, but if there is a simple option in Pre as well, that's just as good.
I don't know how much time I've wasted with all the extra bodies without the simplification. I've asked about merging mesh/bodies before, and never got a response like this, so thank you very much for the info!

-Maxim- April 18, 2018 08:09

Hi Erik,
another thought - not sure if it helps though: AFAIK Pre has turned on some "automatic interface detection" by default. Since you'll set your interfaces by hand/ccl file, you won't need that and could deactivate the automatic detection. Maybe that speeds up things too? I'm just guessing here since I've never worked with huge models like yours before :)

evcelica April 18, 2018 11:19

Thanks Maxim,

I have tried disabling "automatic default interfaces" before, as well as the "automatic default domain", neither seemed to help.
The fluent mesh works well, and the topology options that Opaque suggested sounds like it should do the same thing.
The one thing I like about exporting to Fluent Mesh is that it immediately then gets me out of Crashbench. I mean Freezebench. Better Yet, Doesn'tWorkBench.


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