# Drag coefficient implementation

 Register Blogs Members List Search Today's Posts Mark Forums Read

 November 24, 2020, 11:02 Drag coefficient implementation #1 New Member   Sumit Peh Join Date: Oct 2018 Location: Beijing Posts: 20 Rep Power: 4 Hi Foamers I would like to apply equations of other Drag coefficient in 4 conditions of Renold's number. [Re<1 // 11000] SchillerNaumann has 2 conditions of Re which are Re<1000 and Re>1000 Here is the SchillerNaumann code on ~dragModels I supposed neg(Re - 1000) is this Re<1000 condition and pos0(Re - 1000) is the Re>1000. Code: ```{ volScalarField Re(max(Ur*phase1_.d()/phase2_.nu(), scalar(1.0e-3))); volScalarField Cds ( neg(Re - 1000)*(24.0*(1.0 + 0.15*pow(Re, 0.687))/Re) + pos0(Re - 1000)*0.44 ); return 0.75*Cds*phase2_.rho()*Ur/phase1_.d(); }``` Is there a way to write code for more than 2 conditions ? As my imagination, I guess maybe my case would be Code: ```{ volScalarField Re(max(Ur*phase1_.d()/phase2_.nu(), scalar(1.0e-3))); volScalarField Cds ( neg(Re - 1)*(Equation1) + neg1(Re - 100)*(Equation2) + neg100(Re - 1000)*(Equation3) + pos0(Re - 1000)*(Equation4) ); return 0.75*Cds*phase2_.rho()*Ur/phase1_.d(); }``` Please confirm if i'm right and please correct if i'm wrong. Thanks in advanced James

 Tags cfd, drag, drag coefficient, openfoam

 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 OffTrackbacks are Off Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post Rob Wilk Main CFD Forum 40 May 10, 2020 04:47 welskein ANSYS 0 March 30, 2020 03:56 nereik ANSYS 1 January 27, 2020 10:16 colopolo FLUENT 5 April 12, 2013 10:59 teek22 CFX 1 April 26, 2012 18:41

All times are GMT -4. The time now is 21:52.