Forum: Fluent UDF and Scheme Programming
March 9, 2020, 12:38
|
Replies: 66
Views: 6,170
rpsetvar
If Fluent is not accepting the command to save species gradients then there is problem with the case setup. Species gradients can be extracted without this command as well, using the standard UDF...
|
Forum: Fluent UDF and Scheme Programming
March 9, 2020, 11:05
|
Replies: 66
Views: 6,170
Command
Are you using double quotes around the command? The command needs to have bracket around it but no double quotes.
Secondly, contours of species mass fraction will always exist if species...
|
Forum: Fluent UDF and Scheme Programming
March 8, 2020, 12:33
|
Replies: 66
Views: 6,170
Compilation
It is possible to compile within WB as well, provided the paths for the compiler are correctly set. If the compilation is good, you should be able to find .dll file in the libudf/win64. If it does...
|
Forum: Fluent UDF and Scheme Programming
March 8, 2020, 06:59
|
Replies: 66
Views: 6,170
Compilation
As per this output, there is no compilation of the UDF. You need to compile the UDF outside workbench. And then load it within workbench.
|
Forum: Fluent UDF and Scheme Programming
March 7, 2020, 16:38
|
Replies: 66
Views: 6,170
Code
I checked it at my end and the code works perfectly good. Could you share the output of compilation, i.e., the output shown by Fluent when you click on Build?
|
Forum: Fluent UDF and Scheme Programming
March 6, 2020, 11:12
|
Replies: 66
Views: 6,170
Good
Well, then it is weird. If you use the rp command and then check in Contours, do you see gradients for mass fraction and volume fraction? For volume fraction you have to give TUI so that Fluent keeps...
|
Forum: Fluent UDF and Scheme Programming
March 6, 2020, 11:04
|
Replies: 66
Views: 6,170
Confirmation
Just to confirm, does your case have following characteristics?
1. Multiphase
2. Primary phase with at least two species
If not, then the UDF will not work.
|
Forum: Fluent UDF and Scheme Programming
March 6, 2020, 10:29
|
Replies: 66
Views: 6,170
Code - Modified
Try this one. Ensure to give the rp command before using it. And it must be compiled not Interpreted. Ensure that you have at least one UDM assigned and patched with 0 values before using this UDF.
...
|
Forum: Fluent UDF and Scheme Programming
March 6, 2020, 09:42
|
Replies: 66
Views: 6,170
Modified Code
Paste the modified code here. Do note that my previous suggestion will work as long as you are trying to access only mass fraction gradient. If you also want volume fraction gradient, then it has to...
|
Forum: Fluent UDF and Scheme Programming
March 6, 2020, 08:44
|
Replies: 66
Views: 6,170
Code
The reality is as follows. If you use the command stated earlier,
(rpsetvar 'species/save-gradients? #t)
then you do not need any of these function. C_YI_G are directly available. So, you...
|
Forum: Fluent UDF and Scheme Programming
March 6, 2020, 08:24
|
Replies: 66
Views: 6,170
Sequence of commands
If you do that then Alloc_... comes twice, which is not required. Yes, Free_... for RG is alright.
|
Forum: Fluent UDF and Scheme Programming
March 6, 2020, 08:06
|
Replies: 66
Views: 6,170
SV_Y_G and C_YI_G
Yes, you have to write it as SV_Y_G but while accessing a cell value, it has to be C_YI_G.
|
Forum: Fluent UDF and Scheme Programming
March 6, 2020, 07:10
|
Replies: 66
Views: 6,170
Explanation
-1 is actually SV_NULL and is a variable attribute defined in Fluent's variable structure. Anything more than that would be a goose chase.
For mass fractions, use Y in place of VOF....
|
Forum: Fluent UDF and Scheme Programming
February 29, 2020, 12:08
|
Replies: 66
Views: 6,170
T_derivatives
Well, you have nothing to lose by trying T_derivatives in your code.
|
Forum: Fluent UDF and Scheme Programming
February 29, 2020, 11:39
|
Replies: 66
Views: 6,170
Issue
Then possibly the issue is not with UDF. Does the case run without the UDF?
And are there still comments starting with // instead of contained in /* */? If yes, then you should either remove...
|
Forum: Fluent UDF and Scheme Programming
February 29, 2020, 11:10
|
Replies: 66
Views: 6,170
rpvar
Whole of this command need to be given in one go, along with the parentheses.
|
Forum: Fluent UDF and Scheme Programming
February 29, 2020, 09:49
|
Replies: 66
Views: 6,170
true
It's not a question, rather a boolean. And the Vale is already given in my post as #t.
|
Forum: Fluent UDF and Scheme Programming
February 29, 2020, 09:20
|
Replies: 66
Views: 6,170
Solver
Are you using pressure based solver or density based? If it is pressure based, then you need to tell Fluent to specifically save gradients using the following command
(rpsetvar...
|
Forum: Fluent UDF and Scheme Programming
February 29, 2020, 06:19
|
Replies: 66
Views: 6,170
Function
T_derivatives function is declared in pbns/sg.h, however, I do not think that it is relevant for you. You need to fetch gradients of mass fractions of species. That is accessible via C_YI_G or as...
|
Forum: Fluent UDF and Scheme Programming
February 25, 2020, 10:00
|
Replies: 66
Views: 6,170
Modified Code
Post the modified code. Do note that Fluent does not accept // as argument. Change those to /* */.
|
Forum: Fluent UDF and Scheme Programming
February 25, 2020, 09:57
|
Replies: 66
Views: 6,170
Command
Do you mean the literal Yi_derivatives command? There is no such command in Fluent.
|
Forum: Fluent UDF and Scheme Programming
February 25, 2020, 09:52
|
Replies: 66
Views: 6,170
Species Gradient
Well, those ones appear to be alright to me. You can confirm by plotting their contours. To be able to do that, you have to issue the following command and then run at least 1 iteration
solve set...
|
Forum: Fluent UDF and Scheme Programming
February 25, 2020, 09:41
|
Replies: 66
Views: 6,170
Code
Allocation and reconstruction is available on domain. So, use
Alloc...(domain
instead of
Alloc...(pDomain
Do not use braces unnecessarily; will make code ambiguous. Use Free command only...
|
Forum: Fluent UDF and Scheme Programming
February 25, 2020, 08:31
|
Replies: 66
Views: 6,170
OS
Location varies from computer to computer. You have to find where Ansys products are installed in your computer. I have given the path further from there. If it is Windows, then most likely in...
|
Forum: Fluent UDF and Scheme Programming
February 25, 2020, 08:11
|
Replies: 66
Views: 6,170
Source
Look at the source listing in your installation
./ansys_inc/vXXX/fluent/fluentXX.Y.Z/src
|