Fluids

Fluids

Fluent crashes with 999999: mpt_accept: error: when using C_VOF command in UDF

    • Myslings
      Subscriber
      I am trying to make an UDF for additive manufacturing (material deposition on a flat plate) where there is moving heat source on the substrate and mass source added to the melt pool. For this I need to locate the interfacial cells using this command if(C_VOF(cell,sec_th)>0.05 && C_VOF(cell,sec_th)<1). This command works well for the energy source term. However, if I use the same command for the mass source term fluent crashes with 999999: mpt_accept: error: (Node 0: Process xxxx: Received signal SIGSEGV). Can anyone kindly help me solve this issue?
    • Rob
      Ansys Employee
      Can you run one time step without the UDF and then switch it on? SIGSEV can occur some data isn't present for the UDF and that causes a failure. n
    • Myslings
      Subscriber
      Thank you for your response. I ran 5 time steps without UDF and then I turned on the UDF. Same error occurs. Any other ideas on how to solve this?n
    • Rob
      Ansys Employee
      Having had a more careful look I'd suggest not re-using variables. It probably shouldn't matter but it's something I always avoid doing. What happens if you use a fixed mass source rather than the varying one? n
    • Myslings
      Subscriber
      Even I thought about it and changed the variable names and I also tried constant mass source. Nothing seems to work. If I remove the C_VOF command line if(C_VOF(cell,sec_th)>0.05 && C_VOF(cell,sec_th)<1) then the code works. But I need the C_VOF condition to locate the interfacial cells and apply the mass source on those cells. n
    • Rob
      Ansys Employee
      If you want the interface cells surely 0.45 < Vol fraction < 0.55 give or take? In your case you'll be adding mass of whichever phase to the region where it's all/mostly one phase. n
    • Myslings
      Subscriber
      I tried several different volume fraction limits but fluent still crashes. I have two cell zones, substrate cell zone above which there is air cell zone. Phase 1 is air and phase 2 is substrate material. I apply the mass source term in phase 2 of the substrate cell zone. I think the C_VOF function is causing some problem when added to the continuity equation. I'm not sure what the problem is. n
    • Rob
      Ansys Employee
      If you check the rates how much mass are you adding to the substrate fluid? n
    • Myslings
      Subscriber
      I'm trying to use the equation in the attached figure to calculate the mass source. F_powder is 0.28 g/s and eta_powder is 0.6. Actually, when I apply the mass source term by giving x,y,z position (to check), it is working. But when I try to apply on the interfacial cells using x,y and C_VOF(cell,sec_th)>0.05 && C_VOF(cell,sec_th)<1, then fluent is crashing. I don't know why particularly this condition is making this error. nn
    • DrAmine
      Ansys Employee
      Are you using the VOF model? n
    • Myslings
      Subscriber
      Yes. I am using the VOF model.n
    • DrAmine
      Ansys Employee
      Which UDF source is causing the crash?n
    • Myslings
      Subscriber
      The second one. Mass sourcen
    • DrAmine
      Ansys Employee
      Because it is wrong if you are hooking it into the VOF equation. n
    • Myslings
      Subscriber
      Then how should I do it? Since I am adding the mass source to the particular phase in cell zone should I just use C_VOF(cell,thread>0.05 && C_VOF(cell,thread)<1? And not specify primary and secondary threads?n
    • DrAmine
      Ansys Employee
      Yes because the thread passed is already the phase thread!n
    • Myslings
      Subscriber
      Thanks a lot. Now the error is gone after I changed it to C_VOF(cell,thread>0.05 && C_VOF(cell,thread)<1 without specifying phase specific threads. Should I use the same method for energy and momentum source terms too? n
    • DrAmine
      Ansys Employee
      You first need to understand the conservation equations solved when using VOF model.nnNo not required as single momentum and single energy are solved.n
    • Myslings
      Subscriber
      Ok. Thanks a lot for your help.n
Viewing 18 reply threads
  • You must be logged in to reply to this topic.