|
[Sponsors] |
May 4, 2006, 09:39 |
n_uds error
|
#1 |
Guest
Posts: n/a
|
Hi all,
I have included the header file 'models.h' into my UDF and am using n_uds to check that the scalar has been defined. Every time have interpreted the file I get this response: Error: C:\models\anode.c: line 172: label "n_uds" not found (pc=8768) I'm baffled by this one! Cheers, Nathan |
|
May 4, 2006, 15:28 |
Re: n_uds error
|
#2 |
Guest
Posts: n/a
|
did you use N_UDS in capital letters?
|
|
May 5, 2006, 04:37 |
Re: n_uds error
|
#3 |
Guest
Posts: n/a
|
Hi Aidan,
I have tried both the lower case and higher case versions and there does not seem to be a change. Nathan |
|
September 16, 2015, 10:56 |
|
#4 |
Member
Join Date: Nov 2014
Posts: 42
Rep Power: 11 |
How did you solve the problem.
I have the same problem. I would appreciate if you can help me. |
|
September 16, 2015, 11:03 |
|
#5 |
Senior Member
Bruno Machado
Join Date: May 2014
Posts: 271
Rep Power: 12 |
||
September 16, 2015, 13:32 |
|
#6 |
Member
Join Date: Nov 2014
Posts: 42
Rep Power: 11 |
Thank you for your reply.
But I used enum for specifying my user scalar,too. enum { alpha, N_REQUIRED_UDS }; do you have any other idea for me? |
|
September 16, 2015, 13:48 |
|
#7 |
Member
Join Date: Nov 2014
Posts: 42
Rep Power: 11 |
Actuly these are my program's error after a part of my udf:
enum { alpha, A, B, N_REQUIRED_UDS }; /************************************************** *********************************/ DEFINE_ADJUST(alpha_adjust,d) { Thread *t; cell_t c; if(N_UDS<N_REQUIRED_UDS) Internal_Error("not enough user-defined scalars allocated"); /************************************************** line 316: label "n_uds" not found (pc=18). line 316: function "internal_Error" not found (pc=50). |
|
September 16, 2015, 15:24 |
|
#8 | |
Senior Member
Bruno Machado
Join Date: May 2014
Posts: 271
Rep Power: 12 |
Quote:
#include "udf.h" enum { VORT_Z, /* Index of UDS: VORT_Z=0 */ N_REQUIRED_UDS /* # of UDS variables: N_REQUIRED_UDS=1 */ }; DEFINE_ON_DEMAND(vortz_on_demand) { Domain d; /* domain is not passed in */ Thread t; cell_t c; face_t f; /* Make sure there are enough user-defined scalars. */ if (n_uds < N_REQUIRED_UDS) { Internal_Error("not enough UDSs allocated"); } |
||
September 17, 2015, 01:38 |
|
#9 |
Member
Join Date: Nov 2014
Posts: 42
Rep Power: 11 |
Hi
Thanks for your response. I tried this function but still doesn't work. I 'm wondering if I have mistake about using UDS. I have 3 uds, 1 is for volume fraction transport equation of nanoparticle, and 2 others I use only for calculating temperature gradient and consequently calculation Laplacian. I want to use them as scalars. I would appreciate if you can help me. |
|
September 17, 2015, 01:46 |
|
#10 |
Member
Join Date: Nov 2014
Posts: 42
Rep Power: 11 |
Hi
Thanks for your response. I tried this function but still doesn't work. I 'm wondering if I have mistake about using UDS. I have 3 uds, 1 is for volume fraction transport equation of nanoparticle, and 2 others I use only for calculating temperature gradient and consequently calculation Laplacian. I want to use them as scalars. I would appreciate if you can help me. |
|
September 17, 2015, 05:01 |
|
#11 | |
Senior Member
Bruno Machado
Join Date: May 2014
Posts: 271
Rep Power: 12 |
Quote:
|
||
September 17, 2015, 09:23 |
|
#12 |
Member
Join Date: Nov 2014
Posts: 42
Rep Power: 11 |
Yes I set it and checked the number of scalars in fluent by export-solution data,too.
my English is weak that's because I cant explain my code enough. At first I used property of material like viscosity and ... and then I used enum and adjust for udsi. all the macross are in 1 udf by #include"udf.h" and #include "sg.h" headers. |
|
September 17, 2015, 09:33 |
|
#13 |
Member
Join Date: Nov 2014
Posts: 42
Rep Power: 11 |
As you said alpha is index of my first UDSI(C_UDSI(c,t,0)),
so I have only one Adjust function (Adjust_alpha), but I have 3 scalars, Is it true? |
|
September 17, 2015, 09:57 |
|
#14 | |
Senior Member
Bruno Machado
Join Date: May 2014
Posts: 271
Rep Power: 12 |
Quote:
if(N_UDS<N_REQUIRED_UDS) Internal_Error("not enough user-defined scalars allocated"); But to be honest with you, for the small piece of your problem I know, this is something that does not affect your code at all. If you are not sure how to implement it now, make your code work and later you try to implement this part. |
||
September 18, 2015, 00:27 |
|
#15 |
Member
Join Date: Nov 2014
Posts: 42
Rep Power: 11 |
Thank you for all your responses.
I did it and have this error "Divergence detected AMG solver-Temperature" |
|
September 18, 2015, 05:25 |
|
#16 |
Senior Member
Bruno Machado
Join Date: May 2014
Posts: 271
Rep Power: 12 |
well, this is something else. Not related with this part of the code at all. Check your under relaxation factor to see if your problem can get convergence.
|
|
September 20, 2015, 11:57 |
|
#17 |
Member
Join Date: Nov 2014
Posts: 42
Rep Power: 11 |
I changed one part of my code but this time I face this error
" received a fatal signal error" I even can not initialize my code any more!!!!!!!!!! I need help If you give me some advice , I would appreciate it. |
|
September 20, 2015, 12:21 |
|
#18 |
Member
Join Date: Nov 2014
Posts: 42
Rep Power: 11 |
I found the error is because of wrong boundary condition UDS on the wall.
This is my B.C udf: DEFINE_PROFILE(alpha_bc1,thread,position) { Thread *t; cell_t c; . . . begin_f_loop(f,thread) { C_UDSI_G(c,t,0)[0]=-(D_T/D_B)*C_T_G(c,t)[0]; F_PROFILE(f,thread,position)=C_UDSI_G(c,t,0)[0]; } end_f_loop(f,t) } |
|
September 20, 2015, 12:28 |
|
#19 |
Member
Join Date: Nov 2014
Posts: 42
Rep Power: 11 |
As you see I wanted to return C_UDSI_G(c,t,0)[0] .
It means I wanted to return derivative of UDS as wall boundary value.(volume fraction) Is it right? |
|
September 21, 2015, 04:41 |
|
#20 | |
Senior Member
Bruno Machado
Join Date: May 2014
Posts: 271
Rep Power: 12 |
Quote:
I think the way you are defining the gradient is not the best way to do it. create a profile that returns the value you want for the gradient and in the boundary condition panel in fluent, you can set as a gradient profile using the profile you created. Be careful once you are working with faces and not cells, your macros should not contain cells. |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[swak4Foam] GroovyBC the dynamic cousin of funkySetFields that lives on the suburb of the mesh | gschaider | OpenFOAM Community Contributions | 300 | October 29, 2014 18:00 |
c++ libraries and solver compiling | vaina74 | OpenFOAM Installation | 13 | February 3, 2012 17:43 |
Errors running allwmake in OpenFOAM141dev with WM_COMPILE_OPTION%3ddebug | unoder | OpenFOAM Installation | 11 | January 30, 2008 20:30 |
DecomposePar links against liblamso0 with OpenMPI | jens_klostermann | OpenFOAM Bugs | 11 | June 28, 2007 17:51 |
user defined function | cfduser | CFX | 0 | April 29, 2006 10:58 |