CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT

User energy source problem in FLuent

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By vinerm
  • 1 Post By vinerm

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 24, 2020, 05:25
Default User energy source problem in FLuent
  #1
New Member
 
Ali Ashraf
Join Date: Mar 2020
Posts: 5
Rep Power: 6
Ali Ashraf is on a distinguished road
My problem is basically fluid-flow in a smooth transparent pipe. I aim at adding heat generation source term(W/m3) in each cell to simulate the absorption of solar radiation by the fluid. I use Matlab code to calculate the value of the heat generation term then I insert it to fluent (cell zone conditions>>profiles>>write>>changing the numbers then read the file again), however, the net user energy source I get from fluent(Report>>fluxes>>) is higher than the value I expected and calculated from Matlab. I have tried refining the mesh but the same problem exists. (I have noticed (from the .prof file extracted from Fluent) each cell has three points which all I give the same heat source value ). I don't know the reason for this mismatch between the values I inserted and the way Fluent interprets them??
Ali Ashraf is offline   Reply With Quote

Old   March 24, 2020, 05:43
Default Points
  #2
Senior Member
 
vinerm's Avatar
 
Vinerm
Join Date: Jun 2009
Location: Nederland
Posts: 2,946
Blog Entries: 1
Rep Power: 36
vinerm will become famous soon enough
The three values in the profile that you extracted from Fluent are the coordinates of the cell. Those should not be changed. You need to add fourth value representing your source.
__________________
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.
vinerm is offline   Reply With Quote

Old   March 24, 2020, 11:46
Default
  #3
New Member
 
Ali Ashraf
Join Date: Mar 2020
Posts: 5
Rep Power: 6
Ali Ashraf is on a distinguished road
Thank you Vinerm for your reply, I understand that the fourth set of points in the .prof file is where I should put my values, I mean that each element I have will produce 3 points form 3faces of it. For example: if I have only one element in the domain the .prof file will have 3 X s , 3 Y s and three Z s and of course three points at the fourth set. if I want to add a 1000W/m3 source term for this element. I replace the 3 values of the fourth set to be all 1000 and reread the file. This is what I do but don't get accurate results especially when I have a different energy source for each element.
Ali Ashraf is offline   Reply With Quote

Old   March 24, 2020, 11:54
Default Profile File
  #4
Senior Member
 
vinerm's Avatar
 
Vinerm
Join Date: Jun 2009
Location: Nederland
Posts: 2,946
Blog Entries: 1
Rep Power: 36
vinerm will become famous soon enough
Profile file is written either for faces or for cells. When it is written for faces, then each face is individual. There is no connection between the faces. So, the fourth value will be applied at the center of the face.

When profile is written for cell center, then also only three values are written and not nine. These three values correspond to the center of the cell. Here again, fourth value will correspond to the field you wish to apply and it will be applied at the center of the cell.

There is no cell type with three faces; smallest 3D topology with planar faces is tetrahedron, requiring four triangles.
Ali Ashraf likes this.
__________________
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.
vinerm is offline   Reply With Quote

Old   March 24, 2020, 14:58
Default
  #5
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,761
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
IIRC, Fluent does not allow you to even use a profile for specifying volumetric source terms. You are somehow doing something different...
LuckyTran is offline   Reply With Quote

Old   March 24, 2020, 15:27
Default Profile for Source
  #6
Senior Member
 
vinerm's Avatar
 
Vinerm
Join Date: Jun 2009
Location: Nederland
Posts: 2,946
Blog Entries: 1
Rep Power: 36
vinerm will become famous soon enough
Profiles can be used for source terms.
Ali Ashraf likes this.
__________________
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.
vinerm is offline   Reply With Quote

Old   March 27, 2020, 09:32
Default
  #7
New Member
 
Ali Ashraf
Join Date: Mar 2020
Posts: 5
Rep Power: 6
Ali Ashraf is on a distinguished road
Thank you Vinerm, the written file I get -as we might expect- should have coordinates for cell center (three values for the (x,y,z) of each cell and fourth value where you should place your source value) but what actually happens is that I have a large number of points when I interpret the coordinates I figure out that these points aren't in the center of the cell as I expected, in addition, I have more than one point per cell (by saying point I mean 3 numbers for the 3 coordinates(x,y,z) in the file). please tell me when you write a profile you get values for cell centers only (if you have 10 cells you will get 10 xs,10ys,10zs,10replacable source terms)?if so, that means I am doing something wrong
Ali Ashraf is offline   Reply With Quote

Old   March 27, 2020, 09:45
Default Profile
  #8
Senior Member
 
vinerm's Avatar
 
Vinerm
Join Date: Jun 2009
Location: Nederland
Posts: 2,946
Blog Entries: 1
Rep Power: 36
vinerm will become famous soon enough
You cannot write a Profile from Fluent where it gives you cell centers. Profiles are written only for boundaries. So, the procedure would be to write out any value but using File > Export > Solution Data, select ASCII, cell center option. Then write out any one variable. This will write cell centers. You have to use these cell centers to create your profile.
__________________
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.
vinerm is offline   Reply With Quote

Old   April 12, 2020, 14:39
Default
  #9
New Member
 
Ali Ashraf
Join Date: Mar 2020
Posts: 5
Rep Power: 6
Ali Ashraf is on a distinguished road
Thank You again , I have been trying this method and others. Getting cell centers is good but I can't insert the file back into source terms in cell zone conditions. That's because of the fact that the number of points I am getting from cell centers is different from what ansys expects for profiles. Profiles however is the only way-to my best knowledge- to insert a user source term to certain body in my project.
Ali Ashraf is offline   Reply With Quote

Old   April 13, 2020, 11:31
Default Source
  #10
Senior Member
 
vinerm's Avatar
 
Vinerm
Join Date: Jun 2009
Location: Nederland
Posts: 2,946
Blog Entries: 1
Rep Power: 36
vinerm will become famous soon enough
Fluent does not care about the number of points in the profile file. All it cares about is that the number specified in the very first line mentioning the number of data points should match with the data points really provided in the file. E.g., if first line mentions 4 as its last argument and then provides number of points where either x, y, z, or source value does not have 4 points, then Fluent will give error.
__________________
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.
vinerm is offline   Reply With Quote

Reply

Tags
cell zone conditions, profile generation, source terms, user energy source


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[OpenFOAM.com] swak4foam compiling issues on a cluster saj216 OpenFOAM Installation 5 January 17, 2023 17:05
[swak4Foam] Installation Problem with OF 6 version Aurel OpenFOAM Community Contributions 14 November 18, 2020 17:18
[foam-extend.org] Problems installing foam-extend-4.0 on openSUSE 42.2 and Ubuntu 16.04 ordinary OpenFOAM Installation 19 September 3, 2019 19:13
Trouble compiling utilities using source-built OpenFOAM Artur OpenFOAM Programming & Development 14 October 29, 2013 11:59
[swak4Foam] Error bulding swak4Foam sfigato OpenFOAM Community Contributions 18 August 22, 2013 13:41


All times are GMT -4. The time now is 14:33.