Error reading new case
I'm having a weird problem lately with Fluent. I'm running transient cases in batch mode using a journal file. After one case is finished, I have it save the case and data, load the template case again, and start over. My issue is that, after reading a new case, I get the Fluent access violation error:
FLUENT received fatal signal (ACCESS_VIOLATION)
1. Note exact events leading to error.
2. Save case/data under new name.
3. Exit program and restart to continue.
4. Report error to your distributor.
Error Object: #f
I thought it was something I scripted wrong in the batch file, but I tried duplicating the problem manually and it happens every time I load a case, calculate, and then read a new case. Actually, it reads the new case fine but gives the error once it tries to start calculating the new solution.
Is there something I'm doing wrong here? I'm confused because I did the exact same thing a few months ago and it worked fine, so I wonder if my school updated to a newer version which has a glitch. Has anyone experienced this problem and found a solution? Any help is appreciated.
EDIT: I should mention that I'm using a define-cg-motion UDF with my unsteady case, and as far as I can tell from reading the forums, the access violation error seems to have something to do with UDFs. However, when I was testing it manually I deactivated the dynamic meshing on the new case so it shouldn't be using the UDF anyway. Also, it doesn't seem to make sense why it would work fine for the first case but give the error after reading the second case if the UDF is to blame, because the code is the same for each.
Okay, so I did more tests with this. First, I used a transient test case that used no UDFs. I ran it for a few iterations, opened it again, tried to run it, and had the same access violation error. This also happened using a 3D steady case, although I got another error first in that case. Therefore, this doesn't have anything to do with my UDF or journal file. I even tried using the double precision solver and there was no difference.
However, with 2D cases I did not encounter the error at all. I am using Fluent 12.0.16, and unfortunately do not have the ability to roll back to an older version. What can I do? All I can think of at the moment is to make a .bat file that will close and re-open Fluent every time I want to run a new case, but I don't know how to do that. The batch file would have to open Fluent and have it run from the journal file which defines certain parameters.
Can anyone offer advice?
Okay, this is getting to be ridiculous. I tried the old files I was using a few months ago which worked, as well as a new test file that doesn't have any UDFs. Both give me the error when running a case and then another manually but give me no error when executing the same commands from a journal file. The case that I want to run gives me the error whether I'm running manually or from a journal file, with the udf on or off.
My conclusion is that there must be something about my case that causes Fluent to crash, even though it runs fine as long as I don't try to load it and run a second time. I also don't know why there is an access violation error with the other (somewhat working) cases when reading it again manually.
Well, for now I found a work-around by running fluent from batch files and forcing it to exit each time. This is slightly inconvenient because I need a new journal file and batch file for each separate case, but at least it works. If anyone has any other ideas, please let me know.
Error reading previously working case
I am having the same problem. If I build up a case from scratch and add in UDF's bit by bit, the job runs fine (I should note that I initialise after adding in each UDF so the reason it works is not due to an establised solution). However, my problem is slightly different. If I keep fluent open after I get the case running, I can re-run it, even with modifications, without problem. But if I close fluent or it crashes for some reason, when I reopen and try to run the identical (or even an older version of the same) case and UDF, which I know works, it gives me the access error.
I am using the porous media model. For simpler cases, simply initialising the solution with the porous/source term boxes disabled was enough to get around the error. For more complicated cases with extra BCs and UDSs (described using UDFs) I have to build the case from scratch, literally from a mesh file, every time I re-open fluent (more than inconvenient with 28 UDFs!!) because even if I disable all of my UDFs (although source code is still compiled) I get the error.
I think my error might be due to my code. I can open much more basic source code and load those UDFs into the current case without problem. However, because my current code does actually work when added bit by bit, I can't find where the problem is. I have tried restructuring the source code, running old UDFs first, steady-state..... but no luck so far.
I have not yet tried to run from batch, but just wondering if you have since found a different solution/work around.
EDIT: I am using Fluent V6.3.26
I have just tried running the exact same case and UDF on V12.1 (I previously had to rollback to V6 due to mass imbalance issue with porous model in a shrinking domain) and it opened up and ran straight away without problem. So it appears that my problem is due to some instability with V6, will test further.
|All times are GMT -4. The time now is 10:57.|