Are CFD results always exactly repeatable from run to run?

Anonymous

Are CFD results always exactly repeatable from run to run?

Anonymous
Not applicable

If nothing is changed in the setup of a model in Simulation CFD - including number of iterations run - will the reults always repeat exactly? Or are there material devices or boundary conditions that include randomized factors they may cause slight variations from run to run?

 

The HVAC tutorial model seems to produce slightly different results from run to run. Unless I am doing something wrong, I assume there is something going on in the resistance or blower models that has some kind of random guess factor in the nonlinear solving. 

0 Likes
Reply
Accepted solutions (2)
1,995 Views
24 Replies
Replies (24)

Anonymous
Not applicable

Is it meshing that has the random parameter? 

 

I have been running some informal tests. Autosizing->Generating Mesh->Removing All Mesh->Autosizing......

 

Each time the element count changes (sometimes it's exactly the same, seemingly randomly). It changes very little, as little as .02%, but it changes. 

 

I tried with all solid materials, all fluids, combinations of solids and fluids with and without Enhancement turned on. It keeps changing. 

0 Likes

srhusain
Alumni
Alumni

Hi:

 

If the mesh changes as you have observed, the results will be different because the overall discretization changes.

The mesh can change if mesh sizes, boundary conditions, or material properties are changed from one run to the next.

So, for example, even if you do nothing to the mesh size/autosize specifications but change a fluid material to a solid or vice versa, the mesh will definitely change.

Another example is when a fluid wall slip/symmetry bondary condition is applied/removed between runs. In this case, the mesh changes to correspondingly remove/reinstate the boundary layer prismatic elements.

The above two examples are not exhaustive.

 

0 Likes

Anonymous
Not applicable

I am not changing anything. All I do is remove the mesh, and re-autosize. After generating the mesh I see a different number of elements. 

 

My point is I see that behavior with all sorts of different setups. 

0 Likes

srhusain
Alumni
Alumni

Can you post the support file so i can take a quick look?

Thanks

0 Likes

Anonymous
Not applicable

Here's a video (https://www.dropbox.com/s/s6et4xfcow5aik1/capture-1.avi). It's just the electronics tutorial dataset. 

 

No boundary conditions, one solid material. Autosize, generate, remove and repeat. 

 

 

0 Likes

srhusain
Alumni
Alumni

Hi:

I discussed with the meshing team and can confirm what you are seeing.

A variation in the order in which certain operations under autosizing are performed gives rise to very slightly different length scales which leads to a slightly different mesh. Also, with autosizing we don't purport to provide a mesh that yields a mesh independent solution that's what adaptaton is for.
Hope this helps.

 

0 Likes

Anonymous
Not applicable

Yes that helps. I am not complaining as they are very slight changes. I am trying to account for very slight variations in results on some of my models as I am sure I will be asked. 

 

Are there any other conditions that may cause randomized output? Like material devices (fans, resistances) or radiation, motion contact, etc.?

0 Likes

srhusain
Alumni
Alumni

Not to my knowledge- assuming that the mesh is exactly the same.

0 Likes

Anonymous
Not applicable

Here is why I ask:

 

Attached is a screenshot of the Decision Center for the HVAC tutorial (share file attached as well). 

 

It shows the exact same scenario copied twice, and all of them run in series using the same settings (run out to auto-convergence). 

 

The values differ, ever so slightly. Again it's not a big deal in practice, but I know I will be asked why and aswering "I don't know" could raise doubts in the results. 

 

Even a very simple laymans explanation for the variation would be great.

 

Thanks

0 Likes

Royce_adsk
Community Manager
Community Manager

Hello,

 

Let me clarify.

 

The solver is not random, the materials are not random.

 

The mesher can be can be all so slightly different even with the same setup with each time the mesher is run.  Typically, you wouldn't see much of a change visually in the mesh, but could cause minor fluctuations in the results because the mesh is just slightly different.  In this case what you have is a non mesh-independent solution and would require more mesh to convice yourself that changes in the mesh do not fluctuate the results significantly.  The slight changes in the mesh might even trigger the auto convergence checker when it is at the default level to finish at different iterations counts.

 

You hadn't finished following the model setup for your HVAC example. It does dicuss adding in a flag to more accurately model the mesh enhancement around the ends of the surface parts.  Whenever surface parts are used I suggest to always use the surface refinement option in the mesh edit window.  This second adjustment isn't discussed in the tutorial, but I wish it was.

 

What you have now (look at your velocity legend) are really poor results near the surface part because of the above two changes missing that I am suggesting.

 

When you look at the error for those values you are talking about a 0.003% difference, does that really cause you concern?

 

-Royce



Royce.Abel
Technical Support Manager

0 Likes

Anonymous
Not applicable

I'm not concerned that results can well represent the real world. I'm not concerned at all really. I have been asked in the past "will it always be the same?". I am finding that the answer is no, but I can't explain why. A simple high level exaplanation would suffice. 

 

I realize the models I have sent you are far from "done". That's not the point. The point is that results are changing from run to run. It seems there is some random component to the solution. An itnital gues perhaps that is tied to a random number generator? 

 

Obviously the more converged a solution is, and the more mesh indepent that solution is, the closer the end results will be from run to run. But why wouldnt it be exactly the same from run to run? You would think an algorithm would use the same criteria in it's decision making every single time (unlike us mere mortals).

 

I admit what the solver is doing is over my head most of the time, I don't think it's doing anything wrong. I just want to be able to quickly explain the phenomena myself. 

 

Thanks

 

 

0 Likes

srhusain
Alumni
Alumni
Accepted solution

As i mentioned previously, any difference in results are due to the slight differences in the mesh. If you mesh the first scenario, run it, then clone and the the second scenario the same number of iterations, you should get identical (to within machine round-off) results. See attached imageMadjerry.PNG

0 Likes

Anonymous
Not applicable

Ok first of all, I acknowledge that slight differences in mesh produce slight differences in results. Those slight difference in mesh appear to be a result of some random factor. Why would the mesh change if nothing else has? In Simulation Mechanical I get the exact same element count every time. I'm not saying that is better of worse, I just expected the same thing in CFD. 

 

Second, the image I attached in an earlier post shows exactly what you are describing. Three copies of the exact same scenario (same mesh) producing different results. Why?

 

I am getting the sense your frustrated with me, I hope I'm not coming off as argumentative.

 

However my question has not been answered. You mentioned "machine round off". If such a thing can account for these differences I would be satisfied. 

 

I was hoping this would be a simple answer, and that I was missing something silly. Sorry for the trouble.

0 Likes

srhusain
Alumni
Alumni

To your points:

1) That is the characteristic of the mesher and its heuristics

2) When you ran the cloned scenarios, did you do anything with the mesh settings such as remove all settings and re-autosize. If so, then (1) above applies

0 Likes

Anonymous
Not applicable

1. Heuristic - sounds better than random - I'll take it!

 

2. No, I just cloned, that's why I am asking if there is anything else that might be....heuristic in nature. Like resistances using Constant Loss Coefficients. I would bet there are some boundary conditions and material devices that involve initial guesses in their solution algorithms.I would still think that initial guess would be the same in two idetical scenarios but maybe not.  I thought maybe there was a quick list of which ones might exhibit this behavior so I (and my clients) could be aware of that. I would think something like that would be more sensitive to mesh and demand more care. 

0 Likes

srhusain
Alumni
Alumni

The point is if you simply clone BEFORE you run the first scenario, the clones undergo a meshing process and hence do not have the exact same mesh, but if you run the first scenarion and AFTERWARDS clone from it, no remeshing occurs in the cloned ones and they get the exact same mesh from the original, which in turn yields identical results.

 

It is important to note that there is nothing "heuristic" in the solver operation- with identical data input (mesh, materials, BCs), identical results are produced by the solver

0 Likes

Anonymous
Not applicable

Nope, I ran the first scenario. This generated mesh and results. I cloned it twice. I ran all of them again using solver manager and restarting from iteration 0, running more than enough iterations for auto convergence. I attached the support file in an earlier thread. I even checked the status file for each scenario, the node and element count is the same. 

 

So your saying this is unexpected? That's really what I'm trying to find out. If it's unexpected than my assunption is that I am doing something wrong, not the product. Sim CFD has been solving these problems alot longer than I have!

 

I'll repeat these steps, just to be sure. 

0 Likes

srhusain
Alumni
Alumni

If the summary files in the 3 scenarios show different mesh counts, this could be a bug because remeshing should not occur on scenarios cloned from a meshed parent (unless materials, BC, or mesh sizes have been subsequently changed in the cloned scenarios). If you find this to be the case, please go ahead and log a case with support.

 

Beyond this I do not have any good answers presently.

0 Likes

Anonymous
Not applicable

No. 

 

Same Node Count. Same Element Count. Same Mesh. Different Results. 

 

I just tried it again. Very small difference, we are talking .023ft^3/min. But it's different. 

 

That screen you posted earlier, was that done with my share file? If not, could I get your share file? Maybe I can nail down what's different. 

 

Do you want me to make a support case of this, then?

 

Thanks

0 Likes