Fluids

Fluids

Floating Point Error when running calculation

    • adamfaeiz
      Subscriber

      I am trying to simulate the separation of Oil, Water and Gas in a 3 phase horizontal separator. I would like to run the problem for a duration of 1 hour. The result that I am looking for should look something like this video: 



       


      I am using a VOF model with 3 Eulerian Phases (Water, Oil and Gas). 



       


      When my calculations are running, I get a floating point error midway and the solver stops working. 


      Any idea how to achieve 3600 s flow time for my CFD simulation?


       


       


       


       

    • Rob
      Ansys Employee

      Staff are not allowed to download files or open attachments. 


      Assuming the boundary set up is sensible and the mesh good quality check the time step: if you reduce it does the model work?

    • adamfaeiz
      Subscriber

      The following are my calculation parameters:


      Time stepping method = Fixed


      Time step size (s) = 0.1


      Number of time steps = 36 000


      Max Iterations / Time step = 1


      Reporting interval = 100


      Profile Update Interval = 100


      The model works with small time steps but it requires a very long time to reach a solution.I tried reducing the time step to 0.001 s which means the number of time steps has to be 3600000. I only got flow time of 11.55 s after 12 hours of running calculations. I am trying to achieve a flow time of 3600 s to study the separation process.


       


      Result obtained when flow time = 11.55 s. 


    • Rob
      Ansys Employee

      You shouldn't use VOF & dispersed: use Multi-fluid VOF for this type of model (under the Eulerian option) which is covered in DOC. You may also be able to reduce the length of the inlet pipe. 


      Multiphase models do need a small time step, you may get speed up with NITA and also using more cpu cores.  I'd also review the initialisation options (specifically patching) to get a good starting point. 


      How many phases, and what volume fractions are you considering?


       

    • adamfaeiz
      Subscriber

      So these are my new model settings:



      I got the following error in my console while running calculation:


       


       


      Flow time = 1.549999952316284s, time step = 65


      85 more time steps


       


      Error at Node 0: Global Courant number is greater than 250.00 The


      velocity field is probably diverging. Please check the solution


      and reduce the time-step if necessary.


       


      ===============Message from the Cortex Process================================


       


      Compute processes interrupted. Processing can be resumed.


       


      ==============================================================================


      Field function saved in this object doesn't exist anymore.


       


      Error: CAR: invalid argument [1]: wrong type [not a pair]


      Error Object: ()


       


      Error: Error Occured during handling message in WorkBench: Generic Command


       


      Error Object: #f


       


       


      Calculation complete.


       


       


       


       


      I am considering 3 phases with the following volume fractions:


      Oil = 0.3


      Water = 0.3


      Gas = 0.4

    • Rob
      Ansys Employee

      OK, so Euler is a good choice.  The first part of the error is Courant Number: your time step is probably too big. The rest is the solver failing following the numerics failing. 

    • adamfaeiz
      Subscriber

      I'm already using a time step size of 0.0001s. If it is smaller it will take a very long time to run. Is it okay if i choose to run using implicit formulation so that there won't be a problem of Courant Number?


       


      Also, what do you mean by "solver failing following the numerics failing" ? 

    • Rob
      Ansys Employee

      Your time step is a function of the flow speed and cell size: as a result time steps can get very small. 


      My comment refers to the errors. Typically something goes wrong (caused by settings etc) and that gives an initial error. From there we see a longer list of problems as the original issue triggers further failures in the code. Hence why we always want the full error and not just the last few lines of text. 

    • adamfaeiz
      Subscriber

      Hi there, sorry I've been quiet for a while. 


      So I updated my geometry as shown in the image below. The inlet pipe has been shortened as recommended. 



      I was wondering if it is a good idea to use Discrete Phase Modelling (DPM) alongside Eulerian models. I came across this idea after reading some articles about multiphase CFD modelling.


      Since I only have one inlet as the boundary condition, should I manipulate the volume fractions of gas, liquid and oil; or use the injection option in DPM. 


      What is your input on this?

    • DrAmine
      Ansys Employee

      DPM is only tracked with the primary phase and particles do not see free surface so you need some UDF's. If using inert particles and not two-way you can enable beta feature to track wither other phases.

    • DrAmine
      Ansys Employee

      Moving to fluid thread

Viewing 10 reply threads
  • You must be logged in to reply to this topic.