Fluids

Fluids

Topics related to Fluent, CFX, Turbogrid and more.

Conservation issue with a UDS solution

    • Scott Ormiston
      Subscriber

      We are modelling an aerosol concentration with a Fluent UDS that solves the Drift-Flux transport equation for a single particle

      size group. We are experiencing inconsistent behaviour with the UDS solution between restart and continuous running of a case. We have done a significant number of tests and we need help to understand that the code is doing.

      Here is a README on what is happening:

      Summary of physical problem being solved:

      A UDS equation is being used to simulate aerosol transport within a chamber. The scalar transport is one way coupled. A steady state background flow was first obtained before running a transient simulation with the aerosol model. The UDS equation is the only equation active during the transient simulation. A udf (DEFINE_UDS_FLUX) is used to implement the aerosol drift flux model. The additional convective flux accounts for the effects of gravitational settling and phoretic forces on the aerosol phase. Currently, a range of particle diameters are being simulated independently.

      Summary of main udf routines:

      my_uds_flux_and_wall – the UDS flux function being used. It applies the drift velocity at interior faces as well as at select wall boundaries to facilitate aerosol deposition on the walls. The deposition flux is stored in UDMI. A surface integral report of this UDMI gives the total deposition rate for aerosol mass imbalance calculation.

      calc_Drift_velocity – calculates the aerosol drift velocities at the beginning of the aerosol simulation. The aerosol drift velocities are dependent on the background flow solution and the particle diameter. They are independent of the aerosol solution itself so they are only calculated once and stored in UDMI.

      aerosol_clipped_diffusivity – calculates the aerosol diffusion coefficient. Turbulent diffusion is the dominant mechanism. The Brownian diffusion coefficient is negligible for the range of particle sizes currently being considered.  Problems were encountered with negative concentrations. It was determined this was do to poor cells with very small diffusion coefficients. Setting the diffusion coefficient to zero prevented negative concentrations from occurring. In the working simulations the diffusion coefficient is set to zero once it falls below a certain threshold

      aerosol_dmdt – calculates the mass storage rate for the uds aerosol in the cavity. This report is used to compute the aerosol mass imbalance along with the aerosol boundary flows.

      Simulation procedure:

      1.      Read ‘aerosol template’ case file and ‘background flow’ data file

      2.      Run the species and energy equations to calculate mass fraction and temperature gradients needed to calculate drift velocities

      3.      Set desired particle diameter with scheme variable. This scheme variable us accessed by the user code

      4.      Calculate the drift velocities with EXECUTE_ON_DEMAND and store them in UDMI

      5.      Run the aerosol simulation for a desired period of time. Write intermediate results files along the way  

      ·       The aerosol mass imbalance, transient storage term, and boundary flows are written at every timestep in report-file-monitors-0.out

      ·       The case file aerosol-template2 added solver-monitors-0.out to monitor the iterations per timestep, average and maximum value of the absolute value of the uds equation residuals.

      The problem we are having: 

      There has been some unusual and inconsistent behavior when starting an aerosol run from the beginning (step 1) vs continuing a run from an intermediate aerosol case and data file. The aerosol mass imbalance changes abruptly on the first timestep of a resumed run, sometimes it increases and other times it decreases. The variation of the aerosol mass imbalance vs time is different before and after resuming the run. In some instances, the transient storage term is briefly affected when the run is resumed. In the SG-60um case included all of the aerosol boundary flows are disrupted. The residuals do not appear to be significantly higher after re launching the run.

       We suspected the modified diffusion coefficient or the change in timestep size  may have something to do with the inconsistent behavior. A test case included in “investigate-restart” folder was performed with a different diffusion coefficient (max[turbulent,1e-4]), ensuring the local diffusion coefficient was constant and did not change when restarting the run. One run was carried out continuously to 1 minute and another was resumed from a 10s intermediate file. The timestep was not changed. In this instance the final mass imbalance was significantly different but the aerosol flows were not affected.  

    • Luca B.
      Forum Moderator

      Aerosol simulation in Ansys Fluent can require some attentions. The abrupt changes in aerosol mass imbalance and the transient storage term behavior when resuming from an intermediate file can indeed be perplexing. Let me share some general insights from similar Fluent simulation challenges that might help you troubleshoot the problem.

      In cases where there is an unreasonably small time step in a transient simulation, it is often related to the mesh size. The time step size is proportional to the mesh size, and if the mesh is not uniform or has varying densities, it can lead to issues like the ones you're experiencing . 

      Furthermore, when dealing with multiphase models, it is recommended to use a coupled solver with a pseudo transient option for all steady-state multiphase runs, as it adds a time marching under-relaxation which can help stabilize the solution .

      It's also important to ensure that the boundary conditions are set up correctly. Incorrect specification methods, especially for mass flow rate inlets, can lead to problems in solving the model.

      Lastly, when simulating particle flows, the particle size can significantly affect the simulation results, and it's crucial to ensure that the maximum number of time steps is sufficient for the particles to be tracked accurately.

      While these resources may not directly address the specific issue with the diffusion coefficient and timestep size, they provide a starting point for troubleshooting complex transient simulations in Fluent. It may be beneficial to review the mesh quality, solver settings, and boundary conditions to identify any potential sources of instability in your simulation.

       

Viewing 1 reply thread
  • The topic ‘Conservation issue with a UDS solution’ is closed to new replies.