ansys / pymapdl

Pythonic interface to MAPDL
https://mapdl.docs.pyansys.com
MIT License
421 stars 119 forks source link

Pyansys #7

Closed DivyanshuGola closed 6 years ago

DivyanshuGola commented 7 years ago

How to read .cas and .dat files obtained from ansys fluent?

akaszynski commented 7 years ago

I'd have to write a reader for those as well as pyansys can only read files generated from ANSYS APDL. Would you be willing on volunteering some example files and some sample code?

On Tue, Aug 22, 2017 at 21:33, DivyanshuGola notifications@github.com wrote:

How to read .cas and .dat files obtained from ansys fluent?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/akaszynski/pyansys/issues/7, or mute the thread https://github.com/notifications/unsubscribe-auth/ALbTP9H7lw7OD8URPj0N7uzQLI5TAEgCks5say0OgaJpZM4O_FUx .

DivyanshuGola commented 7 years ago

Dear Alex,

Thank you for replying. I am currently working on a project which involves reading .cas and .dat files generated from fluent, on Python. Therefore, I would be very happy to contribute as I have to read some files of the same format.

Yours truly Divyanshu

On 23-Aug-2017 2:24 AM, "Alex Kaszynski" notifications@github.com wrote:

I'd have to write a reader for those as well as pyansys can only read files generated from ANSYS APDL. Would you be willing on volunteering some example files and some sample code?

On Tue, Aug 22, 2017 at 21:33, DivyanshuGola notifications@github.com wrote:

How to read .cas and .dat files obtained from ansys fluent?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/akaszynski/pyansys/issues/7, or mute the thread https://github.com/notifications/unsubscribe-auth/ ALbTP9H7lw7OD8URPj0N7uzQLI5TAEgCks5say0OgaJpZM4O_FUx .

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/akaszynski/pyansys/issues/7#issuecomment-324148801, or mute the thread https://github.com/notifications/unsubscribe-auth/AWQgNGOyGjMIt8XV25HWzCpPuwlI9D77ks5sa0ABgaJpZM4O_FUx .

DivyanshuGola commented 7 years ago

I was wondering how do we interpret bunary files generated by fluent. Is this information given somewhere?

Thanks.

Divyanshu

On Wed, Aug 23, 2017 at 1:51 PM, Divyanshu Gola divyanshu.gola@gmail.com wrote:

Dear Alex,

Thank you for replying. I am currently working on a project which involves reading .cas and .dat files generated from fluent, on Python. Therefore, I would be very happy to contribute as I have to read some files of the same format.

Yours truly Divyanshu

On 23-Aug-2017 2:24 AM, "Alex Kaszynski" notifications@github.com wrote:

I'd have to write a reader for those as well as pyansys can only read files generated from ANSYS APDL. Would you be willing on volunteering some example files and some sample code?

On Tue, Aug 22, 2017 at 21:33, DivyanshuGola notifications@github.com wrote:

How to read .cas and .dat files obtained from ansys fluent?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/akaszynski/pyansys/issues/7, or mute the thread https://github.com/notifications/unsubscribe-auth/ALbTP9H7l w7OD8URPj0N7uzQLI5TAEgCks5say0OgaJpZM4O_FUx .

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/akaszynski/pyansys/issues/7#issuecomment-324148801, or mute the thread https://github.com/notifications/unsubscribe-auth/AWQgNGOyGjMIt8XV25HWzCpPuwlI9D77ks5sa0ABgaJpZM4O_FUx .

akaszynski commented 7 years ago

I'll have to add the reader at some point. My work doesn't normally include reading CFD files, so it might take a while for me to add this feature in my spare time.

DivyanshuGola commented 7 years ago

You can take your time. Also I wanted to know where do I get the information about the binary file, that is how do I comprehend it myself.

Divyanshu

On 24-Aug-2017 6:41 PM, "Alex Kaszynski" notifications@github.com wrote:

I'll have to add the reader at some point. My work doesn't normally include reading CFD files, so it might take a while for me to add this feature in my spare time.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/akaszynski/pyansys/issues/7#issuecomment-324630412, or mute the thread https://github.com/notifications/unsubscribe-auth/AWQgNHGoHzJGETiXpIYwU-PjyY7pASfOks5sbXZ_gaJpZM4O_FUx .

akaszynski commented 7 years ago

After a quick search, I haven't found any resources describing the dat file format from ANSYS.

OpenFOAM has a converter that gives some insight into the format of the file: http://www.openfoam.com/documentation/user-guide/fluent.php

As OpenFOAM can read in fluent files, you might want to try out it for now.

DivyanshuGola commented 6 years ago

Hello Alex,

I found this while searching for formats of data and case files generated by Fluent. https://www.sharcnet.ca/Software/Fluent6/html/ug/node1490.htm Do you think we can proceed on these lines?

On Thu, Aug 24, 2017 at 8:31 PM, Alex Kaszynski notifications@github.com wrote:

After a quick search, I haven't found any resources describing the dat file format from ANSYS.

OpenFOAM has a converter that gives some insight into the format of the file: http://www.openfoam.com/documentation/user-guide/fluent.php

As OpenFOAM can read in fluent files, you might want to try out it for now.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/akaszynski/pyansys/issues/7#issuecomment-324661666, or mute the thread https://github.com/notifications/unsubscribe-auth/AWQgNBkYx7smKiXI391Q4SqjIaD8Pp-Iks5sbZA_gaJpZM4O_FUx .

akaszynski commented 6 years ago

Good find! Yes, I think it will be possible to start work on it. Do you have some example data and case files?

DivyanshuGola commented 6 years ago

Yes, I have some sample case and data files. I have attached them with this mail.

On Fri, Sep 1, 2017 at 10:08 PM, Alex Kaszynski notifications@github.com wrote:

Good find! Yes, I think it will be possible to start work on it. Do you have some example data and case files?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/akaszynski/pyansys/issues/7#issuecomment-326627552, or mute the thread https://github.com/notifications/unsubscribe-auth/AWQgNDPct7vpbmLRivLir_Bta_SqH6hjks5seDMJgaJpZM4O_FUx .

akaszynski commented 6 years ago

I think you'll have to go onto GitHub on this thread to upload files.

DivyanshuGola commented 6 years ago

Github doesn't support uploading these type of files.......I think should be able to download them from gmail.Please give me your gmail id.

On Fri, Sep 1, 2017 at 11:45 PM, Alex Kaszynski notifications@github.com wrote:

I think you'll have to go onto GitHub on this thread to upload files.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/akaszynski/pyansys/issues/7#issuecomment-326649454, or mute the thread https://github.com/notifications/unsubscribe-auth/AWQgNDjYAar6S5I4oXvN98IswM8xswAQks5seEmngaJpZM4O_FUx .

akaszynski commented 6 years ago

akascap@gmail.com

DivyanshuGola commented 6 years ago

Hello Alex, I tried reading the case and data files using :

with open('sample.cas') as f: content1=f.readlines()

I am able to print the contents as a list. But I am not able to find any values or coordinates of nodes in the file as shown in the user guide (link that i sent you earlier). Can you help me with this? By the way, are you able to extract something useful out of the files?

Thanks.

On Sat, Sep 2, 2017 at 12:05 AM, Alex Kaszynski notifications@github.com wrote:

akascap@gmail.com

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/akaszynski/pyansys/issues/7#issuecomment-326654141, or mute the thread https://github.com/notifications/unsubscribe-auth/AWQgNILvHYeYmaJDWE7s0a1258A8M2zUks5seE6PgaJpZM4O_FUx .

akaszynski commented 6 years ago

CFD results are out of scope of this project at the moment.

silencetraveler commented 1 year ago

How to read .cas and .dat files obtained from ansys fluent?

Hello, blogger, have you found a way to read the fluent dat file with python? My most research also needs to use python to read the node data (pressure, density, etc.) in the dat file

DivyanshuGola commented 1 year ago

Hi,

The ansys handbook has the format specified for the data files. They are binary files which you can read using various numpy modules.

Hope this helps.

On Sat, 3 Jun 2023, 05:23 silencetraveler, @.***> wrote:

How to read .cas and .dat files obtained from ansys fluent?

Hello, blogger, have you found a way to read the fluent dat file with python? My most research also needs to use python to read the node data (pressure, density, etc.) in the dat file

— Reply to this email directly, view it on GitHub https://github.com/ansys/pymapdl/issues/7#issuecomment-1574909875, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFSCANAM2BLUAWRQ5QKJOZLXJMUEZANCNFSM4DX4KUYQ . You are receiving this because you authored the thread.Message ID: @.***>