Ansys Learning Forum › Forums › Discuss Simulation › Fluids › SIGSEGV error in hydrogen adsorption-desorption simulation with UDFs › Reply To: SIGSEGV error in hydrogen adsorption-desorption simulation with UDFs
hi Rob,
Thank you for your reply. I set 4 UDS before compiling the UDF, but I am still encountering the same types of errors. I suspect there might be an issue with how pressure is being calculated.
In my UDF, I am using the following line: Â P = C_P(c, t) + RP_Get_Real("operating-pressure")Â
The initial and inlet pressure are set at 0.04858 MPa, while the operating pressure is defined as 10 MPa.The pressure is expected to rise quickly, but in my case, it decreases rapidly and even becomes negative. Due to this negative pressure, I am unable to obtain the value of usdi(c, t, 0)
.
Below is the portion of the UDF that I am currently using
  Thread *t;Â
  cell_t c;
  real dt;
  Â
  thread_loop_c(t, domain) {
    begin_c_loop(c, t) {
      dt = RP_Get_Real("physical-time-step");
      C_UDSI(c, t, 1) = C_UDSI_M1(c, t, 1) + 0.15 * dt * (C_UDSI_M1(c, t, 0) - C_UDSI_M1(c, t, 1));
    }
    end_c_loop(c, t)
  }
}