# Problem on reading from Ansys and COMSOL

**URL:** <https://root-forum.cern.ch/t/problem-on-reading-from-ansys-and-comsol/48148>\
**Category:** Garfield++\
**Created:** [December 22, 2021, 4:21am UTC](https://root-forum.cern.ch/t/problem-on-reading-from-ansys-and-comsol/48148 "2021-12-22T04:21:53Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lowerce](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/lowerce/32/27228_2.png) [@Lowerce](https://root-forum.cern.ch/u/Lowerce)\
**Post date:** [December 22, 2021, 4:21am UTC](https://root-forum.cern.ch/t/problem-on-reading-from-ansys-and-comsol/48148/1 "2021-12-22T04:21:54Z")

</div>

As the title, I tried examples Gem and Comsol, the origin examples worked well, but when I replaced the field file with my own (I only used the part of reading field process in examples), they did not work.  
I want to know if it is the problem with the field files. Following are the field files I used.  
[ComsolFieldFile.zip](https://root-forum.cern.ch/uploads/short-url/q9bJZ58te5guKx3IykyL3fv4kc5.zip) (997.3 KB)  
The ansys file is too big, so I made a shared link following.  
[https://wwo.lanzouy.com/iaU5axuzvwb](https://wwo.lanzouy.com/iaU5axuzvwb)

---

<div class="post-metadata">

**Author:** ![hschindl](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/h/977dab/32.png) [@hschindl](https://root-forum.cern.ch/u/hschindl)\
**Post date:** [December 22, 2021, 3:18pm UTC](https://root-forum.cern.ch/t/problem-on-reading-from-ansys-and-comsol/48148/2 "2021-12-22T15:18:45Z")

</div>

Your Comsol field map uses a linear tetrahedral mesh (4 nodes per mesh element). The ComponentComsol interface only works with quadratic tetrahedral meshes (10 nodes per element) at the moment. I’ll put it on our to-do list to add the possibility to also read linear tetrahedral meshes, but for the time being the easiest solution is probably to re-run Comsol and use a quadratic tetrahedral mesh.

I didn’t manage to download the Ansys files (I don’t know which button to click on after following the link you sent).

---

<div class="post-metadata">

**Author:** ![Lowerce](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/lowerce/32/27228_2.png) [@Lowerce](https://root-forum.cern.ch/u/Lowerce)\
**Post date:** [December 23, 2021, 6:14am UTC](https://root-forum.cern.ch/t/problem-on-reading-from-ansys-and-comsol/48148/3 "2021-12-23T06:14:35Z")

</div>

Sorry for my negligence about Ansys file.  
I upload it again by WeTransfer.

> **[AnsysFieldFile.zip](https://wetransfer.com/downloads/367bb8a1c2005f68fd57f51ccd2fa7f320211223053837/a0faf7)**
>
> 1 file sent via WeTransfer, the simplest way to send your files around the world

I’m also trying your suggestion about Comsol.  
Thanks for your reply!

---

<div class="post-metadata">

**Author:** ![Lowerce](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/lowerce/32/27228_2.png) [@Lowerce](https://root-forum.cern.ch/u/Lowerce)\
**Post date:** [December 24, 2021, 2:00pm UTC](https://root-forum.cern.ch/t/problem-on-reading-from-ansys-and-comsol/48148/4 "2021-12-24T14:00:43Z")

</div>

Thanks a lot for your solution.  
By following your advice, Comsol field file can be read correctly by Garfield++.

---

<div class="post-metadata">

**Author:** ![hschindl](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/h/977dab/32.png) [@hschindl](https://root-forum.cern.ch/u/hschindl)\
**Post date:** [December 28, 2021, 10:03am UTC](https://root-forum.cern.ch/t/problem-on-reading-from-ansys-and-comsol/48148/5 "2021-12-28T10:03:15Z")

</div>

Hi,  
sorry for the delay. I downloaded your ANSYS file, and the import works fine for me.  
Can you make sure you have the latest version of Garfield++ and try again?

---

<div class="post-metadata">

**Author:** ![Lowerce](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/lowerce/32/27228_2.png) [@Lowerce](https://root-forum.cern.ch/u/Lowerce)\
**Post date:** [December 28, 2021, 3:37pm UTC](https://root-forum.cern.ch/t/problem-on-reading-from-ansys-and-comsol/48148/6 "2021-12-28T15:37:57Z")

</div>

Thanks for your test.

My Garfield++ was installed recently, I can not make sure it’s the problem of version or some other things wrong. I will try your suggestion and give my feedback.

Thanks again for your patient reply!

---

<div class="post-metadata">

**Author:** ![system](https://root-forum.cern.ch/uploads/default/original/3X/e/f/efe4f24398fd8ffeb76bccb6ecc46d9d9c003376.png) [@system](https://root-forum.cern.ch/u/system)\
**Post date:** [January 11, 2022, 3:38pm UTC](https://root-forum.cern.ch/t/problem-on-reading-from-ansys-and-comsol/48148/7 "2022-01-11T15:38:03Z")

</div>

Closed on January 11, 2022, 3:38pm UTC

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
