|
[Sponsors] |
problem when I interpret my UDF for granular viscosity |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
May 6, 2015, 14:00 |
problem when I interpret my UDF for granular viscosity
|
#1 |
New Member
javier
Join Date: May 2015
Posts: 6
Rep Power: 11 |
Hello,
I'm doing my degree’s final project and I need to create an UDF for granular viscosity in Eulerian model. I have two UDF's for granular viscosity, but both have the same problem when I interpret it. The UDFs are these: 1) #include "udf.h" DEFINE_PROPERTY(Shear_Vis_Lun_modified,cell,thread ) { real shear_vis_lun; real strain_rate; strain_rate= C_STRAIN_RATE_MAG(cell,thread); shear_vis_lun = 11224*pow(strain_rate, (0.323-1)); return shear_vis_lun; } 2) #include "udf.h" DEFINE_PROPERTY(solid_viscosity,cell, thread) { real mu; real str=C_STRAIN_RATE_MAG(cell,thread); mu=11224*pow(str,(0.323-1)); return mu; } The mistake that appears in fluent is the following: cpp - I"/ansys_inc/v140/fluent/fluent14.0.0/src" - I"/ansys_inc/v140/fluent/fluent14.0.0/cortex/src" - I"/ansys_inc/v140/fluent/fluent14.0.0/client/src" - I"/ansys_inc/v140/fluent/fluent14.0.0/multiport/src" - I. DUDFCONFIG_H="<udfconfig.h>" "/home/jfernandez/Proyecto jfernandez/malla1/caso 1/solid viscosity.c" Error: /home/jfernandez/Proyecto jfernandez/malla1/caso 1/solid viscosity.c: line2: syntax error. I have to compile these UDFs but encountered other problems also. I don`t know what would be better, to compile or to interpret. If it would be better to compile; I would be able to show my problem as I do so. It is very important for my project; I would really appreciate any help I can get. Thank you beforehand. |
|
May 8, 2015, 06:44 |
|
#2 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
Are you able to interpret or compile other udfs? The ones from the manual for example?
|
|
May 8, 2015, 13:37 |
|
#3 |
New Member
javier
Join Date: May 2015
Posts: 6
Rep Power: 11 |
Hello
I have to get to compile my UDFs mysteriously. I don't know how I did it, lol But I have a new problem now. UDFs are so difficult Thank you for your help [ Moderator note: text below came from post that was in this thread: http://www.cfd-online.com/Forums/flu...ure-model.html ] Hello I need to create an UDF for granular viscosity. I have to try with differents UDFs but I always have some problem. Do you get to creat an UDF for granular viscosity? I would really appreciate any help I can get Thank you beforehand Last edited by wyldckat; May 8, 2015 at 16:22. Reason: moved and merged posts on the same question |
|
May 11, 2015, 08:27 |
|
#4 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
If you need help, you should ask a specific question. Right now it is not clear how anybody can help you.
|
|
May 11, 2015, 11:28 |
|
#5 |
New Member
javier
Join Date: May 2015
Posts: 6
Rep Power: 11 |
Hello
I'm going to try to explain better my case. I have created two UDF's for granular viscosity. Both UDF's are up. Firstly, I don't know if this UDF's are correct for granular viscosity in Eulerian model. When I compile some of this UDF, I obtain the following: [IMG]file:///C:\Users\javier\AppData\Local\Temp\msohtmlclip1\01 \clip_image002.jpg[/IMG] And then, I build without problem. |
|
May 11, 2015, 11:29 |
|
#6 |
New Member
javier
Join Date: May 2015
Posts: 6
Rep Power: 11 |
Then, I change settings,
Finally, when I start the calculation, It appear this message: # Divergence detected in AMG solver :mp-x-momentum -> decreasing coarsening group size! # Divergence detected in AMG solver :mp-x-momentum -> Increasing relaxation sweeps! # Divergence detected in AMG solver : presure correction -> turning off correction scaling! # Divergence detected in AMG solver : pressure correction -> Increasing relaxation sweeps! Error: DIvergence detected in amg solver: pressure correction Error Object: #f I don't know how can I solve these problems. I would appreciate your help Thank you |
|
May 18, 2015, 13:00 |
|
#7 |
New Member
javier
Join Date: May 2015
Posts: 6
Rep Power: 11 |
Hello again,
I think that I found the mistake. I changed the udf, fixing granular viscosity for check the udf, and the result was perfect #include "udf.h" DEFINE_PROPERTY(Shear_Vis_Lun_modified,cell,thread ) { real shear_vis_lun; shear_vis_lun = 850; return shear_vis_lun; } Also, I created a UDF for viscosity on primary phase, using C_STRAIN_RATE_MAG(c,t) and the result was wrong. The error was the same (DIVERGENCE DETECTED....) #include "udf.h" DEFINE_PROPERTY(viscosity,c,t) { real visco; visco = 380.18*pow(C_STRAIN_RATE_MAG(C,t),0.547-1.); return visco; } I think the mistake is in strain rate function, but I don´t know how I can change this problem. thanks in your advance. best regards |
|
June 11, 2015, 11:40 |
|
#8 |
New Member
javier
Join Date: May 2015
Posts: 6
Rep Power: 11 |
I solved my problem initialazing with a previous solution. Thank you for your help
|
|
Tags |
compile error, granular viscosity, interpreted udf |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Problem UDF for Turbulen viscosity | fevi84 | Fluent UDF and Scheme Programming | 2 | June 25, 2017 19:25 |
compile a udf or interpret it? | ndabir | Fluent UDF and Scheme Programming | 1 | July 14, 2012 03:49 |
UDF interpret in Fluent | wanghaojie | Fluent UDF and Scheme Programming | 1 | February 3, 2012 15:51 |
UDF using problem, error happens-heip!! | Michael | FLUENT | 1 | December 9, 2008 08:51 |
UDF variables F1, y / problem with UDF | Fabian | FLUENT | 6 | June 2, 2003 11:22 |