UDF for non-Newtonian fluid viscosity
Hi every body
I have Written an UDF for non-Newtonian Fluid, but it doesn't work in both series and parallel fluent run.the code is: #include "udf.h" #include "math.h" #include "sg_udms.h" #include "sg.h" #include "stdio.h" #include "mem.h" #include "dpm.h" #include "surf.h" DEFINE_PROPERTY(cell_viscosity,c,t) { #if !RP_NODE real SR=C_STRAIN_RATE_MAG(c,t); real n=0.70; real k=0.29; real YSR; real PV=10.00; real YP=6.00; real EV; YSR=YP/(k-PV); if (SR<YSR) EV=YP*((2*YSR-SR)/(YSR*YSR))+k*((2-n)+(n-1)*(SR/YSR)); else EV=(YP/SR)+k*(exp((n-1)*log(SR/YSR))); return EV; #endif } it's my pleasure if some body could help me BEST REGARDS |
whats the error you are getting?
|
AMG solver ERROR
|
What non-newtonian model are you trying to write a udf for? Bingham? HB? Cross? Power law?
I have one written for HB with n=1. Reply with more information. -BB |
Need help for UDF generation
Dear All,
I am trying to get formula's for sst kw equations. i found but so many. could you please help me upload formula which are common for use for sst kw model. I want UDF for inlet boundary conditions for wind flow which is fully turbulent. thanks in advance |
Quote:
It is straightforward to write a UDF for velocity inlet. Provide us more details on what you intend to give as the boundary condition i.e. what kind of velocity inlet condition you wish to specify. Then a simple udf can be written and hooked up. As for the "sst kw", I'm assuming it means steady state k-w turbulence model? You can get the model details and equations from the ANSYS user manual. -BB |
Quote:
|
Quote:
Check out this link from CFD online: http://www.cfd-online.com/Wiki/SST_k-omega_model This is from the theory guide: https://www.sharcnet.ca/Software/Flu...ug/node487.htm -BB |
Quote:
|
Quote:
|
Hi Bhargav Bharathan
I am trying to write HB(Herschel-Bulkley) for various n,K and Yield Point. n,k and Yield Point will be change in every run. |
The original UDF from moabdi's opening post gives negative viscosities. That is why Fluent will give a solver error. Check if you made no mistake in typing the equations or constants.
|
Quote:
you are right, negative viscosity caused be this term : k-PV and must be replaced by PV-k now, i ask if some body has the better formula for define Herschel-Bulkly non-Newtonian fluid model in UFD thanks and Best Regards |
Quote:
When you say n, K, tau change n every run then I guess you mean they change for every new trial where you have a range of each values? I suggest you write journal files instead of UDFs, since you just want to change the material properties. All you need to do is prepare the journal file then load it for each case. -BB |
Quote:
yes, i have one model that must be solved with 5 different non-Newtonian fluids, then compare the results, so, what is "journal files" ? and how could create or write a journal file? please, explain more thanks and Best Regards |
Hi,
Read up on the internet about it, if you are having troubles I can send over my own journal file for this purpose. Although I must warn you the order of the commands in the journal could change depending on the exact setup you choose. Hence, even if you have my file or a reference from somewhere else always check line by line for errors before implementing. https://www.sharcnet.ca/Software/Flu.../ug/node94.htm http://www.cfd-online.com/Wiki/Fluen...TUI.29_Related -BB |
Quote:
thanks and Best Regards |
pleeezz send me a udf bingham fluid
|
Please try to implement it yourself, and come here if you have problems.
|
All times are GMT -4. The time now is 08:41. |