# automatic change of advetion scheme (blend factor)

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

 September 21, 2004, 02:28 automatic change of advetion scheme (blend factor) #1 Ben Guest   Posts: n/a hello everybody my problem discribtion: I would like to do a simulation during the night (or weekend). I want to start the calculation with a low "Blend Factor" and after 30-50 time steps change to a higher "Blend Factor". now my question: is there a possiblity to change this factor automaticly after a specified amount of steps or reaching a predefined convergence level? Thanks for your help in advance greets Ben

 September 21, 2004, 18:23 Re: automatic change of advetion scheme (blend fac #2 Glenn Horrocks Guest   Posts: n/a Hi Ben, You can always do this with two simulations, with the second simulation using the first as an initial condition. This can be automated with a batch file or script file. Glenn Horrocks

 September 23, 2004, 02:09 Re: automatic change of advetion scheme (blend fac #3 Ben Guest   Posts: n/a Hi Glen, thanks for your reply. I thought there is an other way to change the advection scheme during the run.. Do you know whether the value of the blend factor is changeable during run by using CCL? greets Ben

 September 23, 2004, 14:21 Re: automatic change of advetion scheme (blend fac #4 Robin Guest   Posts: n/a Hi Ben, You can specify your blend factor as a CEL expression. As an expression, in this case, it must return a single value. To make it change during the run, make it a function of the absolute iteration number, 'aitern', or the current iteration number, 'citern'. I suggest creating a 1D interpolation function, entering coordinate values equal to the iteration number and variable equal to the blend factor. If, for instance, you want the blend factor to be 0.5 from iteration 1 to 50, then increase to .9 between 51 and 60, enter the following data pairs: 50 0.5 60 0.9 When you define the linear interpolation function, make sure you check the extend min and extend max options. This will cause it to evaluate to 0.5 if below iteration 50 and 0.9 if above 60. A linear interpolation will be used to evaluate the blend factor between 50 and 60. Regards, Robin

 September 23, 2004, 14:44 Re: automatic change of advetion scheme (blend fac #5 Robin Guest   Posts: n/a Actually, there is a bit more to it. First, here is the resulting CCL for the function and the Solver Control object: LIBRARY: CEL: FUNCTION: blendFactor Argument Units = [] Option = Interpolation Profile Function = Off Result Units = [] INTERPOLATION DATA: Data Pairs = 50,0.5,60,0.9 Extend Max = On Extend Min = On Option = One Dimensional END END END END FLOW: SOLVER CONTROL: ADVECTION SCHEME: Blend Factor = blendFactor(aitern) Option = Specified Blend Factor END END END Pre will give you an error about the solver control object, just ignore it. Now, normally you cannot do this since the solver does not allow the blend factor to be a function of iteration number. To make it work, you will have to use a local RULES file. Create a local copy of /etc/RULES and open it in an editor (do not edit the original). Find the Blend Factor parameter object and add the 'Dependancy List' parameter, as shown below: PARAMETER: Blend Factor Description = Specifies the blend between pure UDS (0.0) and \ second order (1.0) discretisation. Solver Name = BETA Parameter Type = Real Quantity Type = Dimensionless Dynamic Reread Item = Yes Default = 1.0 Lower Bound = 0.0 Upper Bound = 1.0 ## Add this: Dependency List = aitern, citern END To use the local RULES file for your run, add a '-ccl RULES' flag to your solver arguments. You can do this from the command line, or from the Solver tab in the Define Run dialog. From the command line it would look like this: cfx5solve -def muRun.def -ccl RULES If you saved the RULES file to another directory, include the appropriate path. Best of luck. Regards, Robin

 September 26, 2004, 11:51 Re: automatic change of advetion scheme (blend fac #6 Jeff Guest   Posts: n/a ....or.... For a simple step change your could use the following CEL: sw_pt = 50 # switch blend factors at iter. 50 bf1 = 0.25 # initial blend factor bf2 = 0.75 # second blend factor bf = step(sw_pt-citern)*bf1 + step(citern-sw_pt)*bf2 The first step fuction is 1 if current iteration number (citern) > sw_pt (50) and 0 after. The second step function is reversed. On exactly 50, you get half of each (0.5). Then plug bf in for your blend factor on the solver form. A more complicated ramp function could also be implemented with a little more effort. Jeff

 September 28, 2004, 10:32 Re: automatic change of advetion scheme (blend fac #7 Robin Guest   Posts: n/a I would argue that a linear interpolation is easier to set up than a step function, but this could be done as well. -Robin

 Thread Tools Display Modes Linear Mode

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

 Similar Threads Thread Thread Starter Forum Replies Last Post realanony87 CFX 1 November 10, 2015 11:36 Gary Holland CFX 10 March 13, 2009 04:30 Kushagra CFX 4 May 2, 2008 13:14 zonexo Main CFD Forum 0 September 26, 2005 21:15 stefano CFX 1 March 24, 2003 07:23

All times are GMT -4. The time now is 16:44.