Fluids

Fluids

Topics related to Fluent, CFX, Turbogrid and more.

Patching two variables (volume fraction & pressure) in the same zone

    • Raffael_Mitrou
      Subscriber
      Hello there,I am trying to initialize my two-phase VOF transient simulation with my two zones such that the entire right zone initially is filled with water (volume fraction =1) at a pressure of 101325 Pa. And the other zone (porous zone) shall be filled with 100% nitrogen at a pressure of 4000Pa.nI used to initialize the case based on the nitrogen like this:nGauge Pressure = 4000nLiquid volume fraction = 0nWhen I afterward patched the right zone with the liquid I set the volume fraction to 1 and clicked patch. Then, I also set the pressure to 101325 Pa and clicked patch again. nDo I overwrite the patch like this or are both variables patched?nWhen I checked my liquid volume fraction contours and my absolute pressure contour of the mixture, everything seemed alright!nThanks in advance!nn
    • Rob
      Forum Moderator
      Patch will overwrite the field you select, so patching pressure won't affect volume fraction. n
    • Raffael_Mitrou
      Subscriber
      Thanks for the response!nUnfortunately, it did not become completely clear to me.nPatching two variables on the same field will apply only the last patched variable, such that the first one will not be considered, correct?nI already tried to initialize with a pressure of 101325 Pa instead and set the liquid volume fraction to 0, to be able to patch the liquid volume fraction on the one zone and the pressure of the nitrogen (4000 Pa) on the other zone, but I am not sure if that's possible!?n
    • Rob
      Forum Moderator
      Phase fraction in Fluent adds up to 1, so you'd typically initialise the domain with (for example) all gas phase and then patch in the liquid. No need to patch a zero phase and then patch another phase into a zone unless you have many phases.Patching two variables on the same field will apply only the last patched variable, such that the first one will not be considered, correct?nIf it's the same variable then correct. Eg patching temperature of 120C and 5C in that order will give a 5C in that zone. n
    • Raffael_Mitrou
      Subscriber
      So initializing the electrolyte (2nd phase) volume fraction with 0 means 100% nitrogen (1st phase) is present in all domains (when I don't specify one certain domain), correct? And then I patch electrolyte in one of the two zones (right zone) with a volume fraction of 1.nSo when I patch the pressure of the mixture in the right zone to be 101325 Pa afterward, I should have patched both variables?nBut when checking POST I find the pressure to be around 4000 Pa in all domains and just a bit higher in the right zone (about 5000 Pa) instead of an expected pressure of nearly 101325 Pa.nIs there a way to patch both: pressure & volume fraction? Or am I doing something wrong?n
    • Amine Ben Hadj Ali
      Ansys Employee
      1/List the steps you are following when patching.n2/Steady State Analysis? In-compressible? Closed Domain?n
    • Raffael_Mitrou
      Subscriber
      1/ nSteps:n1_Initialiszation:nGauge Pressure:4000 & Elektrolyte Volume Fraction:0 --> Initializen2_Patch:n2.1_Electrolyte > Volume Fraction = 1 & Selecting the right zone --> Patchn2.2_Mixture > Pressure:101325 Pa & Selecting the right zone --> PatchnnAlso, I always check my contours:electrolyte volume fraction & abs. pressure and it seemed to have both been patched for me.nn2/nI have a transient VOF simulation and I have the porous media model activated for the left zone.nPhase 1 = nitrogen --> is defined as ideal-gasnPhase 2 = electrolyte --> is as incompressible liquidnI use a pressure-based solver, Energy activated, Turbulence:Reynold Stress activated, gravity activated, my domain is at the very left symmetry and the two zones are separated by an interior BC, pressure-inlet and rest is walls.nn
    • Amine Ben Hadj Ali
      Ansys Employee
      And the results of 1/ is not as you expect?n
    • Raffael_Mitrou
      Subscriber
      The electrolyte is patched correctly in the right domain but the pressure difference that I need is not present. You can take a look at the above screenshot which I attached, showing that there is almost no pressure difference.n
    • Amine Ben Hadj Ali
      Ansys Employee
      Can you Fluent check the volume average of static pressure right after the initialization step and after one time step /iteration in each volume?n
    • Raffael_Mitrou
      Subscriber
      I am sorry, I am beginner in programming and did not understanding very well. There are three expressions with some conditions in it. nWhere is the third expression and how can I set the conditions 0=Solution Animations? I deactivated that to save time and as I am doing those vids in POST.n
    • Amine Ben Hadj Ali
      Ansys Employee
      You can enable solution animation to let the scene or contour plot be updated every N steps. Same can be done with Calculation ACtivities.nnLet's stick to the main issue here: Yes after one time step or even after one iteration in a time step: do you see a massive change in the pressure field after the initialization?n
    • Raffael_Mitrou
      Subscriber
      Yes, I used to do that but decided to deactivate it.nI have license problems today. I will check it asap and give you an update!nThank you so far!n
    • Amine Ben Hadj Ali
      Ansys Employee
      Okayn
    • Raffael_Mitrou
      Subscriber
      Array referring to your question: Yes after one time step or even after one iteration in a time step: do you see a massive change in the pressure field after the initialization?nI decided to run 5 time steps, in order to see the changes in the contour plot.nnThe steps I performed prior to starting the simulation:n1_Initializationn2_Patch:n 1st Patch: Phase > Electrolyte > Variable: Volume Fraction > Value: 1 (on the right zone) & Check Contour of Electrolyte Volume Fraction --> check was okn 2nd Patch: Phase > Mixture > Variable: Pressure > Value: 101325 Pa (on the right zone) & Check volume-average static & absolute pressure Contour --> check was okn3_Check both contours again --> they were as before okn4_Animation Definition for the absolute Pressure (every time step)n5_Start calculation for 5 Time StepnnResult: After 5 Time Steps pressure drops rapidly to 40 mbar and only a small bar of 100 mbar remains.nnof the left (porous zone)...nn2/ The amount of electrolyte shall be in the area of 70 ml, how can it be in the order kg? I have a 2D case here (for faster calculation). Is a depth of 1m assigned for the 3rd dimension by default or something like that?nPhysics > Solver > Reference Values) and adapted it to my case!nn3/ Ok, I will check the flux from the right domain to the left domain! I will update you afterward!nnI previously did change my inlet (pressure-inlet) to a wall due to the patching of the liquid, in order to see the long-term behavior rather than the filling. And on the very left side, I still have my symmetry face. The rest are walls! Therefore, the domain is closed!nnI use the implicit scheme.nAnd referring to the Solution Methods I use these settings:nn
    • Raffael_Mitrou
      Subscriber
      I still have problems with initialization / patching!nYesterday I initialized my Inlet as a pressure-inlet with 1 bar and defined an event to close the inlet (by changing the BC type to wall) after t=1s.nThen I patched in this order (without closing the patch dialog box - no idea if that changes anything?!):n1/ Electrolyte volume fraction = 1 &n2/ Pressure = 101325 Pa.nnI simulated for 5mins (physical time) using these adaptive time-stepping settings:nnThe result of the absolute pressure distribution is still confusing to me...nFrom left to right one can see times 0.0001 s, 0.00179995 s, 1.40828 s and 2.7401s and the corresponding absolute pressures.nObviously, after 1 s - when the inlet BC is changed to a wall BC - the pressure drops immediately.nThe following plot shows the absolute pressure of the inlet face:nFrom experimental data I know, that in reality, the pressure at the inlet drops only slightly below 1 bar (around 800 mbar) within approx. 1 hour (and not within seconds).nHow can it be that the pressure drops that fast considering that the left zone is a porous zone and inhibiting the liquid flow furthermore?n
    • Raffael_Mitrou
      Subscriber
      I would very much appreciate any kind of support referring to the above questions! Thanks a lot in advance!n
    • Hilary Egglestone
      Subscriber

      I am having a very similar problem with pressure patching. I am patching high pressure into zone and it is dissapating almost instantanously when the simuilation begins (which defies physics given the rest of the setup). Was a solution to this problem ever found?

Viewing 19 reply threads
  • The topic ‘Patching two variables (volume fraction & pressure) in the same zone’ is closed to new replies.