Fluids

Fluids

Topics related to Fluent, CFX, Turbogrid and more.

Source Term In Stefan Problem

    • FaizanYounas
      Subscriber

      I'm modelling the Stefan condensation problem in fluent. Initially, my domain only contain vapors with the left wall at sub-cool temperatures (295K). I'm using the UDF for the LEE model and for the addition of source term in the energy equation to maintain the interface at saturation temperature. Although my simulations run with the UDF, the mass transfer isn't taking place and the domain remains complete of vapors. I have checked my UDF and BC multiple times but I couldn't get what is getting wrong.

      It would be of great help if someone can help.

    • Surya Deb
      Ansys Employee
      Hello,
      Lee Model is not a wall condensation model. It is a bulk condensation model.
      So you can check by patching a very thin zone near the wall with initial condensate volume fraction.
      Also, have you tested with the built-in Lee model without using any UDF?
      Regards SD
    • FaizanYounas
      Subscriber
      Thank you for the reply. I tried without the UDF and it works. Also, I figured out the problem with my UDF (For Mass_Transfer UDF you first have to run the following commands: solve/set/advanced/linearized-mass-transfer-udf).
      But, when I load the source term Macro in the cell zone conditions, fluent given this error and it shuts down.
      "Node 0 : Process 43356: Received signal SIGSEGV"
      "Node 1 : Process 31152: Received signal SIGSEGV"

      I tried my UDF with both interpret and compile options. But, this error is the same. I also tried with setting user-defined-memory locations 0,1 and 2. Below is my UDF


    • Amine Ben Hadj Ali
      Ansys Employee
      Just a hint: if you plan to the multiphase mass transfer UDF's do not use the DEFINE_SOURCE ones. If you plan to use DEFINE_SOURCE for mass and energy do not use the multiphase DEFINE Mass Transfer ones.
    • Amine Ben Hadj Ali
      Ansys Employee
      I ran this Stefan's flow with UDF the last few weeks.
      • Amir
        Subscriber

        Hello DrAmine and Surya,

        thank you for this discussion.

        I read the thesis and am trying to resimulate that for the first step, with the same options and even mesh.

        I wonder if you could provide me with some details of your relevant simulation, to know my mistake.

        1) what boundary conditions did you use, are the below correct?

             only the left was wall with temp=5+ T saturated,

             up and down boundaries were symmetric

             and the right side pressureoutlet with the T saturated liquid for the reverse flow.

        2) what viscosities did you use for the phases, as in the table and other parts, the viscosities were not mentioned. only this table

         

        which the standard enthalpy of vapor should be 10000 and liquid 0 as the molecular weight is 1.

        3) For operating conditions,

        where was your reference pressure location and what your Boussinesq parameters were.

        4) on the finest grid used in the thesis, my setup was as below, was that correct?

        • VOF with implicit body force option,
        • first phase liquid and vapor as the second phase
        • the built-in Lee model with saturation temp=373.15, from the phase frequency of 0.1 and to phase frequency of 100
        • Simple as the velocity pressure coupling
        • Georeconstruct for interface capturing
        • time step of 1e-5s
        • second-order discretization for momentum and energy
        • node-based green gauss
        • PRESTO for pressure
        • in the material section, the reference temperature for the two phases 298.15
        • Surface tension on (CSF)/off
        • Gravity was on.

        In the monitors, I got decreasing liquid mass and increasing vapour mass, but followed by a divergence after a while.

        Thank you in advance.

    • FaizanYounas
      Subscriber
      Thank you for the reply. I'm only using now the DEFINE_SOURCE in my UDF. But, my error is still the name, and fluent shutdowns after giving the error
      "Node 0: Process 49168: Received signal SIGSEGV"
      Also, can I ask what is the reason not to use these two macro's in the same UDF (DEFINE_MASS_TRANSFER & DEFINE_SOURCE)






    • Amine Ben Hadj Ali
      Ansys Employee
      Are you using DEFINE_SOURCE for VOF Equations too? Look after master thesis "CFD Modeling and Simulation of Phase-ChangingMultiphase Flows". IFP Energies Nouvelles.

    • FaizanYounas
      Subscriber
      No, I'm only using it for the Energy equation.
      Surely, I'll look into this thesis
    • FaizanYounas
      Subscriber
      Okay, the UDF is working now. I'm only using the DEFINE_SOURCE macro now. But, the results are not what I was expecting ­ƒÿò. I'm trying to verify this graph from the literature. All the parameters are the same as in the reference paper.


      Reference Graph: gamma is denoting the LEE Coefficient


    • Amine Ben Hadj Ali
      Ansys Employee
      I provided a link for the master thesis which does contain the whole code. We optimized that with a couple of vof settings and smaller time steps and the results we are getting are matching. I cannot help you here as you are just making a screenshot of only energy source term which alone is not enough. Moreover you require a better model than Lee here and that is described in the master thesis too.


    • FaizanYounas
      Subscriber
      Thank you for the reply. This is the case. I have confirmed the following things. LEE model can work as a wall condensation model, there is no need to patch the cell adjacent to the wall with liquid (for condensation). The opposite is written in the thesis and the comment above (by ). Secondly, the LEE model is fine enough to match the exact results of the Stefan problem as done in the paper published in 2021 (Temperature changes around interface cells in a one-dimensional Stefan condensation problem using four well-known phase-change models). The opposite is written in the thesis. Thirdly, the use of DEFINE_MASS_TRNSFER and DEFINE_SOURCE is creating problems in the fluent as highlighted by . But, it is being done in the paper that I mentioned above. It is done on old fluent.

      Lastly, I'm now using the built-in LEE model (not from UDF) to model the condensation in my case. I just need to add the source term to match the results with the paper mentioned above. But, here is the thing that a found. We can add source term using DEFINE_SOURCE macro. But, here is another thing that I came across in the Fluent User Guide (2021 R1 version). That the source term can be added using the following command: solve/set/multiphase-numerics/heat-mass-transfer/alternative-energy-treatment? YES .

      The thing is, I don't know where to input the latent heat that is given in the equation in the user guide (Image is attached below). I have read this section further, but couldn't understand much. Let me know if you guys know about this.




Viewing 10 reply threads
  • The topic ‘Source Term In Stefan Problem’ is closed to new replies.