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

Density, user define function

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By AlexanderZ

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 31, 2022, 04:12
Default Density, user define function
  #1
New Member
 
Piyush Rawat
Join Date: Jul 2022
Posts: 14
Rep Power: 4
GreyMat is on a distinguished road
-transient state condition
- density is function of liquid fraction
- liquid fraction is function of temperature, hence density is the function of temperature
- coded a user define function for density
- it worked fine but soon temperature limited warning in console which results in divergence
- what could be the possible problem, any solution pls reply.
Attached Images
File Type: jpg rho program.jpg (71.9 KB, 8 views)
GreyMat is offline   Reply With Quote

Old   July 31, 2022, 20:43
Default
  #2
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
compile your code and read log -> this is what you better do each time after any modification

code seems ok, however you may do following:
1. change double to real type
2. put #define {a_0,a_1,...} part into the header it's not supposed to be inside the loop
3. of course you shold check you equation and parametes it should be smooth and defined on the whole requested range.
4. As you have rather tight range of 2.1 degree make sure you have small enougth timestep to simulate it
GreyMat likes this.
__________________
best regards


******************************
press LIKE if this message was helpful
AlexanderZ is offline   Reply With Quote

Reply


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
[Other] refineWallLayer Error Yuby OpenFOAM Meshing & Mesh Conversion 2 November 11, 2021 11:04
user define function upendra.shukla Main CFD Forum 0 March 25, 2013 04:58
Installing OF 1.6 on Mac OS X gschaider OpenFOAM Installation 129 June 19, 2010 09:23
Version 15 on Mac OS X gschaider OpenFOAM Installation 113 December 2, 2009 10:23
Problem with compile the setParabolicInlet ivanyao OpenFOAM Running, Solving & CFD 6 September 5, 2008 20:50


All times are GMT -4. The time now is 01:51.