# Fluent adapter: Questions regarding initialization

**URL:** <https://precice.discourse.group/t/fluent-adapter-questions-regarding-initialization/1630>\
**Category:** Official adapters and tutorials\
**Tags:** fluent\
**Created:** [October 19, 2023, 8:03am UTC](https://precice.discourse.group/t/fluent-adapter-questions-regarding-initialization/1630 "2023-10-19T08:03:52Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![ilovenili](https://yyz2.discourse-cdn.com/free1/user_avatar/precice.discourse.group/ilovenili/32/1663_2.png) [@ilovenili](https://precice.discourse.group/u/ilovenili)\
**Post date:** [October 19, 2023, 8:03am UTC](https://precice.discourse.group/t/fluent-adapter-questions-regarding-initialization/1630/1 "2023-10-19T08:03:52Z")

</div>

HI:  
When I was doing fluent adapter debugging, I encountered the following problem (see picture):

 ![1](https://global.discourse-cdn.com/free1/uploads/precice/original/2X/c/c0fb882964dac3a06feeaeecf8fc88a2aacf7217.png)  
Please see the red markings in the picture, at this point the abaqus adapter is really not connected to the precice, but in my experience the precice should wait in the red and not run straight down the line, can anyone answer my question?

---

<div class="post-metadata">

**Author:** ![ilovenili](https://yyz2.discourse-cdn.com/free1/user_avatar/precice.discourse.group/ilovenili/32/1663_2.png) [@ilovenili](https://precice.discourse.group/u/ilovenili)\
**Post date:** [October 20, 2023, 9:09am UTC](https://precice.discourse.group/t/fluent-adapter-questions-regarding-initialization/1630/2 "2023-10-20T09:09:22Z")

</div>

I am crazy, anyone help me?

---

<div class="post-metadata">

**Author:** ![Makis](https://yyz2.discourse-cdn.com/free1/user_avatar/precice.discourse.group/makis/32/25_2.png) [@Makis](https://precice.discourse.group/u/Makis)\
**Post date:** [October 22, 2023, 7:59am UTC](https://precice.discourse.group/t/fluent-adapter-questions-regarding-initialization/1630/3 "2023-10-22T07:59:53Z")

</div>

Have you tried removing any left-over `precice-run/` directory, before running again?

---

<div class="post-metadata">

**Author:** ![ilovenili](https://yyz2.discourse-cdn.com/free1/user_avatar/precice.discourse.group/ilovenili/32/1663_2.png) [@ilovenili](https://precice.discourse.group/u/ilovenili)\
**Post date:** [October 22, 2023, 11:10am UTC](https://precice.discourse.group/t/fluent-adapter-questions-regarding-initialization/1630/4 "2023-10-22T11:10:14Z")

</div>

very thanks, I think I know what you mean, but…, I think I should described more details:  
1 I do the coupling between abaqus and fluent  
2 Before coupling with precice, in order to find the cause of the error, I added two lines of print statements inside the localDirectory function in ConnectionInfoPublisher.cpp in precice,as follow:

 ![image](https://global.discourse-cdn.com/free1/uploads/precice/original/2X/5/5fab77654858b0b3212bbb74e65938d2b99b00ec.png)  
3 I ran the abaqus and fluent adapters separately, so let’s take a look at the difference in the input data of the localDirectory() function when running the abaqus and fluent adapters separately,as follow:  
 ![image](https://global.discourse-cdn.com/free1/uploads/precice/original/2X/d/d03cf2a3d36e3df7cbc963be5194f2a752d5605a.png)  
yes ,it’s exact same.  
4 Let’s take another look at the print outInfo of both,as follow:  
 ![image](https://global.discourse-cdn.com/free1/uploads/precice/original/2X/6/678af291c08ed11301de1ec2565c43d71d1effa3.png)  
Well, it’s very strange that Fluent and abaqus are using the same precice function localDirectory(), and with the same input to that function, the output is different, and abaqus successfully prints the last statement “std::cout\<\<“p=======” \<\<p.string()\<\<std::endl;”, but Fluent is calculating “auto P=…” but Fluent is having trouble calculating “auto P=”.

ok, I’ll summarize a few of my issues and hopefully people will give me help, I’m not really sure if it’s a bug or not.  
First question:  
Why does abaqus work fine with the same input, but fluent doesn’t calculate “auto p=…”  
Second question:  
Code “auto p=…” is just splicing strings using boost library, how can this process be wrong?  
Third question:  
why the precice-run directory can only be generated by abaqus, but not when running the  
fluent adapter?

---

<div class="post-metadata">

**Author:** ![Makis](https://yyz2.discourse-cdn.com/free1/user_avatar/precice.discourse.group/makis/32/25_2.png) [@Makis](https://precice.discourse.group/u/Makis)\
**Post date:** [October 23, 2023, 1:57pm UTC](https://precice.discourse.group/t/fluent-adapter-questions-regarding-initialization/1630/5 "2023-10-23T13:57:17Z")

</div>

I assume you have the following directory tree:

```
- 05test/
    - precice-config.xml
    - 01fluent/ 
        - fluent-configuration-files
    - 02abaqus/
       - abaqus-configuration-files

```

When you start Fluent from `01fluent/`, Fluent calls preCICE, which then looks for `precice-config.xml` in the `05test/`. Similarly, when you start Abaqus from `02abaqus/`, Abaqus also calls preCICE, which also looks for `precice-config.xml` in `05test`.

I also assume that the Fluent adapter works fine (I don’t know if that’s true, it is an experimental/unmaintained adapter at the moment).

> [@ilovenili](#):
>
> Why does abaqus work fine with the same input, but fluent doesn’t calculate “auto p=…”

I don’t know, but you could try running Fluent inside a debugger (e.g., compile with `-g`, start with `gdb`) and try to understand where this `std::bad_alloc` comes from. You can set a breakpoint at `localDirectory` and execute the code till that point, before you step into each line. Maybe it does not even crash where you think it is crashing.

> [@ilovenili](#):
>
> Code “auto p=…” is just splicing strings using boost library, how can this process be wrong?

I doubt that this is the problem.

> [@ilovenili](#):
>
> why the precice-run directory can only be generated by abaqus, but not when running the  
> fluent adapter?

This is expected: The one participant creates the `precice-run` directory, where it publishes its address. The other participant then looks into that directory for that address, and connects.

---

<div class="post-metadata">

**Author:** ![ilovenili](https://yyz2.discourse-cdn.com/free1/user_avatar/precice.discourse.group/ilovenili/32/1663_2.png) [@ilovenili](https://precice.discourse.group/u/ilovenili)\
**Post date:** [October 25, 2023, 5:14am UTC](https://precice.discourse.group/t/fluent-adapter-questions-regarding-initialization/1630/6 "2023-10-25T05:14:56Z")

</div>

very thanks.  
After many tests, I finally realized that it is because of the problem of the adapter of fluent\_21\_2\_0 version, because when running the case\_2D that comes with this version  
, you will also find that there will be memory problems, too bad!

---

<div class="post-metadata">

**Author:** ![Makis](https://yyz2.discourse-cdn.com/free1/user_avatar/precice.discourse.group/makis/32/25_2.png) [@Makis](https://precice.discourse.group/u/Makis)\
**Post date:** [October 25, 2023, 9:23am UTC](https://precice.discourse.group/t/fluent-adapter-questions-regarding-initialization/1630/7 "2023-10-25T09:23:15Z")

</div>

Thanks for the follow-up, @ilovenili!

Feel free to open issues in [Issues · precice/fluent-adapter · GitHub](https://github.com/precice/fluent-adapter/issues) regarding the fluent adapter, and link to this discussion. It will be very helpful!

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/precice/original/1X/67d2a5fa6f80e597e2267ff17fa8c1673cd11caa.svg) [@system](https://precice.discourse.group/u/system)\
**Post date:** [October 28, 2023, 9:23am UTC](https://precice.discourse.group/t/fluent-adapter-questions-regarding-initialization/1630/8 "2023-10-28T09:23:52Z")

</div>

Closed on October 28, 2023, 9:23am UTC

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