Ansys Assistant will be unavailable on the Learning Forum starting January 30. An upgraded version is coming soon. We apologize for any inconvenience and appreciate your patience. Stay tuned for updates.
Fluids

Fluids

Topics related to Fluent, CFX, Turbogrid and more.

Mesh replacement causes CDR error in droplet VOF simulation

    • Holly
      Bbp_participant

      Hi,

      I am modelling water droplets falling in air to reach their terminal velocity using a VOF multiphase model. I received the results I was expecting once, and I am now trying to swap out my current mesh for a different mesh to change the droplet size and mesh refinement.

      When I try to read in a new mesh file, it reads successfully - however, the following error message is displayed, and the simulation does not run as expected afterward (pressure field becomes unstable, droplet moves in the opposite direction to expected):

       

      Error: CDR: invalid argument [1]: wrong type [not a pair]
      Error Object: #f

       

      This occurs right after the mesh finishes building and Fluent replays the case settings onto the new mesh (zone matching, boundary conditions, etc. all complete with "Done" before the error appears). I have triple-checked that none of my setup or solution settings have changed in the process of replacing the mesh.

       

      One thing I've noticed that may be related: my case has the Adjoint Solver active (I did not intentionally enable this), and I've found adjoint x-velocity, adjoint y-velocity, and adjoint pressure fields appearing in my Patch panel. I suspect the mesh-settings may be failing while trying to carry adjoint-related data across onto the new mesh, but I haven't been able to find a straightforward way to fully deactivate the Adjoint Solver via the TUI or ribbon. Any guidance on properly disabling it would also be appreciated, in case that resolves the mesh-read issue.

       

      Below is a description of my model, in case it helps:

      • VOF model with explicit volume fraction parameters, implicit body force formulation, sharp interface modelling, and interfacial anti-diffusion all activated.
      • Phase interaction between water and air with a constant surface tension coefficient of 0.072 N/m; surface tension force modelling and continuum surface force both enabled.
      • I am modelling 2D droplets with a diameter of 0.1 mm. I am using an axisymmetric boundary condition (with gravity defined along the positive x-axis, and the domain in the positive y-direction), so I am only modelling half the droplet. The mesh is 15 mm long × 1.5 mm wide, with pressure outlets on all other sides, so that when initialised with hybrid initialisation, the pressure is constant throughout the field. The droplet is patched in after initialisation.
      • I am currently using a PISO solution method with the following spatial discretization settings:
        • Gradient: Least Squares Cell Based
        • Pressure: PRESTO!
        • Momentum: Second Order Upwind
        • Volume Fraction: Geo-Reconstruct

       

      Any suggestions on how to avoid this error when reading in a different mesh, how to fully deactivate the Adjoint Solver, or general comments on improving my current model/solver settings would be greatly appreciated.

      Thanks!

    • Khushi Raj
      Subscriber

      ansys.com/academic/students

    • Rob
      Channel Partner

      CAR-CDR is a Scheme error so as you've switched a model on/off a setting has been missed somewhere. If you look in 

      Uploaded Image

      List Modified Settings hopefully you'll see a blank entry, and you need to revise that. Unfortunately that may mean going back to the mesh and setting up the model again. 

      If you didn't set any criteria for the Adjoint it shouldn't do anything, so usually doesn't need switching off: you can't and Fluent will just warn that nothing's set. 

       

    • Holly
      Bbp_participant

      Hi Rob,

      Thank you for your response. Unfortunately, I wasn't able to find any blank or out-of-place entries under "List Modified Settings."

      I have found a workaround, however: using "Replace Mesh" instead of "Read Mesh" (while keeping the same case file) has let me switch between meshes with the simulation behaving as expected. Interestingly, this only works with this particular case file - when I rebuild the same setup from scratch in a new case file, the droplet is unstable and does not behave as expected. I haven't yet worked out what's different about this case file that makes it work.

      Separately, if you're able to, I'd appreciate any guidance on solver settings or solution methods that might help reduce spurious currents at the droplet surface - this is something I'm seeing given how small my droplets are.

    • Rob
      Channel Partner

      Odd, but read mesh will likely trash the data. 

      How small are the droplets relative to the mesh? Roughly what diameter?

Viewing 4 reply threads
  • You must be logged in to reply to this topic.
[bingo_chatbox]