|
[Sponsors] |
August 10, 2011, 07:39 |
Gradient of species mass fraction
|
#1 |
New Member
deo
Join Date: Aug 2011
Posts: 2
Rep Power: 0 |
hi guys,
I am solving a combustion problem involving ch4 (2 step model), and need the gradient of the species mass fraction for postprocessing. A simple UDF is used to extract the date with the following macro: C_YI_G(c,t,i). However, FLUENT compiles the UDF only for i = 0. When i is 1, 2, 3, or 4, the UDF does not compile. I get an error message instead. Any suggestions on how to solve this problem? |
|
November 21, 2012, 18:26 |
|
#2 |
New Member
Ali Emadi
Join Date: Jan 2011
Posts: 18
Rep Power: 15 |
for 2step CH4 reaction you have 6 species. so for i=0-4 you can access to C_YI_G. for i=5 which refer to N2 you cant access to its gradient because its mass fraction calculated by algebraic equation not transport equation.
type in the console the following commands: solve>set>expert reply yes to question keep memory from being freed? define>models>species reply yes to question save-gardients? |
|
March 14, 2020, 07:15 |
|
#3 | |
Senior Member
mahdi rostami
Join Date: Jan 2020
Posts: 155
Rep Power: 6 |
Quote:
i type this command but not work how to store the species mass fraction gradients in fluent? what is the its command? |
||
March 14, 2020, 19:25 |
|
#4 |
Senior Member
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,751
Rep Power: 66 |
you don't type solve>set>expert but actually solve/set/expert or solve set expert
if you still have trouble, hit return/enter and all the available commands will pop up. /solve will be one of them. type solve [enter] and then [enter] again to see all the commands at the next level. /set will be one of them. Rinse and repeat. If that still doesn't work then record a video. Either you don't have a keyboard or you don't have a monitor, or you're not using Fluent. |
|
March 15, 2020, 12:48 |
|
#5 | |
Senior Member
mahdi rostami
Join Date: Jan 2020
Posts: 155
Rep Power: 6 |
Quote:
|
||
March 15, 2020, 14:11 |
Keeping the Memory
|
#6 |
Senior Member
|
In a pressure-based solver, the command
solve set expert to keep memory from being freed will not provide access to species gradient. That command works for other fields but not for species. For species, you have to either use UDF or (rpsetvar 'species/save-gradients? #t)
__________________
Regards, Vinerm PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority. |
|
March 15, 2020, 14:18 |
|
#7 | |
Senior Member
mahdi rostami
Join Date: Jan 2020
Posts: 155
Rep Power: 6 |
Quote:
this command: (rpsetvar 'species/save-gradients? #t) is equal to define/models/species/save-gradients? (yes) and i enter this commands and not work |
||
March 15, 2020, 16:20 |
Not working
|
#8 |
Senior Member
|
Yes, you can use TUI command as well. But what is implied by command not working? Does the mass fraction gradient not show up under the Derivatives? Or they do show up but the values are always 0? If it is the latter, do check if your cell zone is Fluid and not Solid under Type.
__________________
Regards, Vinerm PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority. |
|
March 15, 2020, 18:11 |
|
#9 | |
Senior Member
mahdi rostami
Join Date: Jan 2020
Posts: 155
Rep Power: 6 |
Quote:
furthermore !!!! after the entering command before 1st iteration fluent crashes and does not perform the calculation one question can i use the C_UDSI_G instead C_YI_G? C_UDSI(..) = C_YI and another question, value of C_UDSI=C_YI is correct in output but when i using the C_UDSI_G, values is different and unreasonable!! why??? |
||
March 16, 2020, 06:05 |
Species Gradients
|
#10 |
Senior Member
|
If Fluent gets hung after using the command to save species gradient then, as stated earlier, there is problem with the case. It will not help you in any way to proceed further. You may get some results but those will most likely be incorrect.
First of all, what is the objective of fetching the species gradients? There are very few requirements where you need species gradients with spatial coordinates. Secondly, just by setting value of a scalar equal to mass fraction you will not be able to fetch the gradients. Since you already have values for mass fractions, you can directly determine the gradient using any of the methods, Green-Gauss or least square. However, as mentioned earlier, if Fluent is not showing mass fraction gradient despite issuing the command, there is something wrong with the setup. Even if you do it using the values of mass fractions, the result would most likely be incorrect.
__________________
Regards, Vinerm PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority. |
|
March 16, 2020, 08:41 |
|
#11 | |
Senior Member
mahdi rostami
Join Date: Jan 2020
Posts: 155
Rep Power: 6 |
Quote:
please guide me |
||
March 16, 2020, 09:14 |
|
#12 | |
Senior Member
mahdi rostami
Join Date: Jan 2020
Posts: 155
Rep Power: 6 |
Quote:
why don't send your email address? mahdi1372rs@gmail.com |
||
March 17, 2020, 10:09 |
Attachment
|
#13 |
Senior Member
|
Look at the attached image.
__________________
Regards, Vinerm PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority. |
|
March 17, 2020, 10:45 |
|
#14 |
Senior Member
mahdi rostami
Join Date: Jan 2020
Posts: 155
Rep Power: 6 |
||
March 17, 2020, 13:13 |
The image
|
#15 |
Senior Member
|
The image I shared shows the option to attach files; marked by red rectangle. You have to look for this when you are writing a post. Just above the writing area, you will notice all the options. Look for the one that I marked with rectangle.
__________________
Regards, Vinerm PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority. |
|
March 17, 2020, 13:20 |
|
#16 |
Senior Member
mahdi rostami
Join Date: Jan 2020
Posts: 155
Rep Power: 6 |
ok found it
this is my fluent case but size is more than 195kb |
|
March 17, 2020, 13:25 |
Attachment
|
#17 |
Senior Member
|
It appears that you forgot to attach the file. You have to first choose and then click on Upload.
__________________
Regards, Vinerm PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority. |
|
March 17, 2020, 13:30 |
|
#18 |
Senior Member
mahdi rostami
Join Date: Jan 2020
Posts: 155
Rep Power: 6 |
the message appear: your filesize exceed from 195 kb
|
|
March 17, 2020, 15:20 |
|
#19 |
Senior Member
mahdi rostami
Join Date: Jan 2020
Posts: 155
Rep Power: 6 |
||
March 17, 2020, 16:44 |
Species Gradients
|
#20 |
Senior Member
|
After initializing the case and issuing the command
(rpsetvar 'species/save-gradients? #t) I could see that the gradients become available under Contours. Look at the attached image.
__________________
Regards, Vinerm PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
mass fraction of species | Lilly | FLUENT | 5 | March 13, 2022 18:52 |
gradient of species mass fraction | zhou | FLUENT | 1 | March 14, 2020 08:55 |
Water subcooled boiling | Attesz | CFX | 7 | January 5, 2013 04:32 |
UDF for Species Mass Fraction Gradient *IN SPECIFIC ZONE * -- e.g. along axis of sym. | ksiegs2 | Fluent UDF and Scheme Programming | 0 | February 27, 2011 13:55 |
On the damBreak4phaseFine cases | paean | OpenFOAM Running, Solving & CFD | 0 | November 14, 2008 22:14 |