Replies: 1 comment
-
I make some progress. Please correct me if I made any mistake. I modified from the example "gabls". Use function "coriolis" to obtain temperature filed and add the buoyancy approximation force. @kernel void coriolis(const dlong Ntotal,
} Then apply the force onto o_FU, which is the forcing term in the momentum equation, as: void userf(nrs_t *nrs, dfloat time, occa::memory o_U, occa::memory o_FU) Remember to check that the functions must be defined in the .oudf file and the kernels are built for nekRS. Hope it is helpful to you and feel free to leave your comments. |
Beta Was this translation helpful? Give feedback.
-
Hello,
I am going to run a simulation by adding the Boussinesq buoyancy approximation (which assumes that the buoyancy force is proportional to the temperature). I have already got the temperature field in my case. I notice that the body force is added in the .udf file with o_FU and udf.uEqnSource. However, I cannot find how I can obtain the temperature field locally and then add it to the momentum equation.
It was easy to define it in Nek5000 .usr file subroutine userf. For clarification, I attached part of the script of adding Boussinesq approximation for Nek5000.
c------------------------------
buoy = temp*1.0
c-------------------------------
Any comments or scripts are welcome! Thanks in advance!
Regards
Yicheng
Beta Was this translation helpful? Give feedback.
All reactions