Fluids

Fluids

Topics related to Fluent, CFX, Turbogrid and more.

non-physical negative uds concentrations with small diffusion coefficient

    • grayg34
      Subscriber

      I am working with a uds convection-diffusion equation. I have already solved the background flow which is steady, turbulent, in a rectangular cavity (1 inlet, 1 outlet, and mass sinks on 1 side wall). All equations are turned off except the uds equation for a transient simulation. The cavity is initialized with a uds concentration of 0 and a copncentration of 1 is specified at the inlet. 

      I was experiencing small areas of non-physical negative concentrations early on in the simulation (around 1s), as the simulation progressed the minimum concentration continued to increase in magnatude to a considerable value. The simulation could progress for a while before the negative concentrations cause convergence or scalar mass imbalance issues but eventually it would run away enough that it did. 

      I determined the cause of the negative concentration to be the small diffusion coeffecient (roughly 1e-12). If I set a large diffusion coefficient (greater than 1e-4) the diffusion spread out and eliminated any significant negative concentration. If I set the diffusion coefficient to 0 there was no negative concentration. In all cases the uds equation was well converged an the backround flow was well converged with good mass conservation. 

      I came across an old forum post by another reporting a similar issue but unfortunately there is no solution presented. https://forum.ansys.com/forums/topic/anisotropic-diffusion-and-negative-concentration/ It sounds as though Fluent is having issues calculating gradients for diffusion terms on the highly non-orthogonal mesh. I switched to Green-Gauss node based but that had little improvement. 

      I have a polyhedral mesh with very fine prism layers near the wall. I have used this uds model on similar meshes for different flows (convction dominant) without any issues of negative concentration. The flow in this particular cavity where I am having issues is stratified and the lower portion is nearly stagnant. This is where the negative concentrations seem to arise first, where the convection term is not dominant.

      As a work around I have created a modified diffusion coefficient that uses my desired value (turbulent + brownian diffusion) when the value is above a threshold and switches to 0 when below the threshold. This works to prevent negative concentration and my simulation is numerically stable however i am forced to neglect secondary dioffusion effects especially near the walls. The concentration builds up too large positive values faster. 

      Obviously switching to a coarser orthogonal cartesian mesh would aleviate the negative concentration issues but I am already invested in this current mesh and need the near wall refinement for specific models in the background flow. I'd greatly appreaciate any suggestions to improve things numerically speaking on my current mesh. 

    • Rob
      Forum Moderator

      Scalars can be harder to converge, but I've run similar cases without problems. Setting diffusivity to zero does tend to cause problems, so it's not something I'd generally recommend. The value should be around the species diffusivity/density. 

      Are the problem areas near any sink/source regions or flow boundaries? 

      • grayg34
        Subscriber

        I was surprised when setting the diffusiviuty to zero prevented the negative concentrations. I guess another option would be to limit the diffusion coefficient to stay above the 1e-4 threshold.. or to either 1e-4 or zero, whichever is closer to the actual calculated diffusion coefficient. 

        The turbulent diffusion is equal to the turbulent viscosity (Schmidt number of 1) generated by the back ground flow. It is above 1e-4 for the majority of the cavity except for the lower stagnant region of the cavity. The brownian diffusion is dependent on the particle diameter being modeled by the uds equation. For the majority of particle sizes I am considering it is neglibibly small, <1e-12 m^/s. For a brownian diffusion coefficient on the order of 1e-4 I would need 0.1 nanometer particles which are far too small to be relavent to my study. 

        The negative concentration does tend to initially arise near the walls of the cavity in the lower stagnant portion of the domain, however negative concentration will occasionaly develope in the center of the stagnant bottom region but not significant enough to cause problems. I have zero flux boundary conditions on all walls in the cavity. I will get some large positive concentrations near the background flow mass sinks which are located in the wall adjacentent cells on one wall. I do not have any scalar source terms. The scalar will be able to leave the domain (deposite on the wall) through a udf custom flux. I deactivated this for troubleshooting the negative concentration issues.   

    • Rob
      Forum Moderator

      So the scalar is mimicking very fine particles. What other equations/effects are causing the scalar to move? If you have a mass sink near the wall are you also removing scalar field? 

    • grayg34
      Subscriber
      The uds equation is being used to implement a drift-flux based aerosol model for particles ranging from 1-50 micrometer in diameter. I am applying the drift velocity with a udf flux function. The drift velocity adds the effects of gravitational settling and phoretic forces on the particle in addition to the convection from the background flow. I had deactivated this custom flux when trying to isolate the cause of the negative concentration. I am not removing the scalar with volumetric sinks corresponding to the background flow mass sinks. I am using the custom flux udf to convect the scalar out of the wall by applying a deposition velocity proportional to the drift velocity. This does cause the concentration to build up slightly beyond the nominal inlet value but this is fine and physically realistic. Again, I turned off the deposition when trying to isolate the negative concentration.
    • Rob
      Forum Moderator

      If you post images of scalar value with node values off it may help. If you monitor the scalar flux function are there any odd results?

    • grayg34
      Subscriber

      Here is a screenshot of where the negative concentration first appears. The values are small now but as the simulation continues to run the magnitude of negative concentration continues to increase and spread in volume. 

       

      I am not sure what you mean by monitoring the scalar flux function? 

    • Rob
      Forum Moderator

      That looks like you're trying to move/remove material that's not present in the cell. Ie the sink isn't linked to cell content. With species it'll stop working as you can't have a negative volume fraction, but scalars don't have a check. 

      • grayg34
        Subscriber

        Yes I am aware that uds sinks can create negative concentrations if not properly linearized. However, I do not have any sources/sinks for the uds equation. There are only sinks in the background flow equations aand they are not located where the negative concentration occurs. The background flow sinks are located within that smaller rectangle but not on the outside edges.   

    • Rob
      Forum Moderator

      Not sure. How well resolved is the mesh in the regions the scalar calc is struggling? The image looks to be 3-4 cells across a gap but that could be an optical illusion. 

      • grayg34
        Subscriber

        I have added a screenshot of the mesh for reference. The surface mesh is reasonably coarse, 1 full cell and 2 half cells along that corner piece. Internally there are very fine prism layers with first cell thickness of ~1e-6m.

         

        I have no doubt the mesh is a large part of the issue with the non-physical concentrations, but as I said before I am kind of stuck with the current mesh and would like to try and make it workable. So far modifying the diffusion coefficient has kept the negative concentration from running away and causing major problems.   

Viewing 7 reply threads
  • The topic ‘non-physical negative uds concentrations with small diffusion coefficient’ is closed to new replies.