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

implementation of a turbulence model in Fluent

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 25, 2018, 07:12
Default implementation of a turbulence model in Fluent
  #1
New Member
 
aek
Join Date: Feb 2010
Posts: 12
Rep Power: 16
saif is on a distinguished road
hi everyone

actually, i m tryng to implement a low turbulence abid model that i get it from some site web in FLUENT, with application of flow around a square cylinder at very low reynolds =(250) , the BCs for K and epsilon were estimated from formulas given in Fluent user guide's in the inlet domain, (K=2.4e-09 and Epsilon=2.75e-13 ) , and velocity inlet for top and down domain with 0 gradient for both turbulence quantities, for the exsit domain i used the outflow BC,
the compilation of the model were successifully done, but when running the simulation after a fews itterations, the code crashes and show ' a floting point error' : invalid number.
i m really upset because i spent a lot of time to solve my broblem, i will verry glad if some one can help me to solve my issue ,
i can attach the UDF code if some one have time to look around


thanks
saif is offline   Reply With Quote

Old   July 25, 2018, 18:36
Default
  #2
New Member
 
aek
Join Date: Feb 2010
Posts: 12
Rep Power: 16
saif is on a distinguished road
anay suggestions ???


did the problem comes from the set of BCs ???


please help
saif is offline   Reply With Quote

Old   July 26, 2018, 00:14
Default
  #3
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
switch off your UDf, try to simulate case with standard k-e turbulence model first using same BC.
If the the problem still exists, than the cause is:
-BC
-mesh quality
-other
If simulation will be completed successfully, than the problem is in your UDF (most likely)

best regards
AlexanderZ is offline   Reply With Quote

Old   July 26, 2018, 02:20
Default
  #4
New Member
 
aek
Join Date: Feb 2010
Posts: 12
Rep Power: 16
saif is on a distinguished road
thanks a lot Alexander for ur suggestions, it's really helpful,
yes i tried this methode before, i lunched the simulation with a standard k-E and i get successfully a converged solution,
but we should remember that a types of BCs in this case, isn't the same in the case of the use of a UDF , because we should set BCs for a 2 UDS (K nd E), either by fixed value or flux value for both quantities, when in the satndard k epsilon model we have in Fluent, for instance ,the choice to use Intensity and Hydraulic diameter,
thanks again once, and hope that u can give me another suggestions,
saif is offline   Reply With Quote

Old   July 26, 2018, 02:25
Default
  #5
New Member
 
aek
Join Date: Feb 2010
Posts: 12
Rep Power: 16
saif is on a distinguished road
in attachement the UDF for Abid model
Attached Files
File Type: c abid_sd.c (3.2 KB, 14 views)
saif is offline   Reply With Quote

Old   July 26, 2018, 04:09
Default
  #6
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
may be the problem comes from BCs. Actually how your domain looks like? I guess it has one inlet, one outlet, and some kind of channel between them.
from your first message:
Quote:
the BCs for K and epsilon were estimated from formulas given in Fluent user guide's in the inlet domain, (K=2.4e-09 and Epsilon=2.75e-13 ) , and velocity inlet for top and down domain with 0 gradient for both turbulence quantities, for the exsit domain i used the outflow BC
inside the code I can see, that you initialize K=2.4e-09 and Epsilon=2.75e-13 everywhere in domain. But it is not BCs.
BCs for UDS we should put manually for each face in domain. By default, BC for UDS is "specified flux" -> UDS boundary value 0. It means 0 gradient, as you've mentioned.
However, I believe at inlet as well as outlet , you should put there other condition (second option) "specified value" -> UDS boundary value K=2.4e-09 and Epsilon=2.75e-13
I'm not about correct values.

I hope it will help

Best regards
AlexanderZ is offline   Reply With Quote

Old   July 26, 2018, 06:42
Default
  #7
New Member
 
aek
Join Date: Feb 2010
Posts: 12
Rep Power: 16
saif is on a distinguished road
thank u Alexander, to ur peek in the UDF and for ur reply


i set the BCs as u can see in the picture:


did these BCs correct??, what do u think?


may be should i add some statements or macro in the UDF?


i would be very glad help me solve my issue


best regards
saif is offline   Reply With Quote

Old   July 26, 2018, 06:45
Default
  #8
New Member
 
aek
Join Date: Feb 2010
Posts: 12
Rep Power: 16
saif is on a distinguished road
in attachement the picture explaining my BCs
Attached Images
File Type: jpg domaine_calcul.jpg (36.7 KB, 12 views)
saif is offline   Reply With Quote

Old   July 27, 2018, 01:08
Default
  #9
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
Unfortunately, I have no experience in implementation of turbulence models. I may only guess.
So I feel, that there should be some turbulence at outflow BC, so flux = 0 is incorrect, from my point of view. I'm not sure about top and bottom inlets, try to change outflow first, and later may be apply same BC at TOP and Bottom as at the left inlet.

best regards
AlexanderZ is offline   Reply With Quote

Old   July 27, 2018, 09:58
Default
  #10
New Member
 
aek
Join Date: Feb 2010
Posts: 12
Rep Power: 16
saif is on a distinguished road
thank u Alexander, i really apreciate ur attention to my issue,


till now i could'nt solve my problem, i tried a severals simulation with differents BCs and the same message error appear('floating point error'),
i will wait for other suggestions


best regards
saif 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
A new EARSM turbulence model implementation elbertj OpenFOAM Programming & Development 8 February 6, 2018 14:12
Question about adaptive timestepping Guille1811 CFX 25 November 12, 2017 17:38
The fluent stopped and errors with "Emergency: received SIGHUP signal" yuyuxuan FLUENT 0 December 3, 2013 22:56
implementation of Spalart-Allmaras Turbulence Model zhengjg Main CFD Forum 0 July 24, 2013 03:43
two turbulence model in fluent duaiduaihu FLUENT 1 August 26, 2009 19:39


All times are GMT -4. The time now is 20:03.