• Re: So Saturation in Block details

    I assume you are referring to a block such as the ASU tank, right?
    The S_O_Saturation is a state variable. By definition, a variable is computed during the simulation: one only change parameters and inputs.
    The oxygen concentration at saturation is purely a function of temperature, in the standard WEST library.
  • Modelling the (inhibitory) effect of salt on activated sludge processes

    Does anyone have experience in (or can perhaps suggest a reference or two about ?) modelling the inhibition effect of salt (e.g. Cl-) on activated sludge processes? Form of the expression, parameter values, etc.?
    Thanks
  • Re: How to create a new model?

    If you have used the "IconName" property of the icon (pay attention to lower and upper case!), it must work.
    Not sure if it was intentional, but the annotation should read:
    [code](* icon = "CVBA_controller" *)[/code]
    (note the inverted commas)
  • Re: How to create a new model?

    Impossible for me to say what may be wrong in your case, if you don't post the relevant lines of the logbook:

    [quote author=CVBA link=topic=2043.msg4626#msg4626 date=1397477098]
    - Loading layout failed, see logging for details
    [/quote]

    If you look into the logbook (F6 if it's not visible), you should find one or more line, flagged as "error" or "warning" which should actually give some more details.

    However, I can briefly explain how you should go about [b]creating a new control model[/b] (assuming that you'd be using one of the existing icons - so bypassing the complication of creating a new, ad-hoc, icon).
    [list type=decimal]
    [li]Duplicate one of the existing control models, e.g. PI_Saturation
    - you could copy the "wwtp.base.controllers.pi_saturation.msl"
    - store it (ideally) in a dedicated folder (for your own development): e.g. "AddOns" at the same level as the rootfile (wwtp.msl)
    - rename it "wwtp.controllers.ABC.msl" (I would remove "base" from the file name)
    [/li]
    [li]Rename the CLASS appropriately - and preferably use the same ID for the filename and the class name.
    In this case, e.g. "CLASS ABC"
    [/li]
    [li]Update the "sentinel" accordingly: something like
    #ifndef WWTP_CONTROLLERS_ABC
    #define WWTP_CONTROLLERS_ABC
    [/li]
    [li]Implement the model. Make sure you respect the syntax, avoid name duplication (i.e. OBJ with the same name, even if in different sections, are not allowed), use every interface variable (cannot define an interface OBJ and not use it in the equation section), ...
    [/li]
    [li]Add the appropriate #include statement, either
    - in the "wwtp.base.controllers.msl": it will then appear in the treeview, with the other control models; or
    - in the "wwtp.msl": it will appear as a branch of the rootfile, but it may be better to "isolate" your own development from the default libraries
    [/li]
    [li]Save the file(s)
    - you may want to "Check Model Library", prior to saving
    - no need to save or regenerate the BlockLib.xml in this case
    [/li]
    [li]Close and reopen your project: the new model should be available
    [/li]
    [/list]
  • Re: Error in control center-parameter estimation

    See Chapter 10 (esp. 10.1) of the WEST Getting Started and Tutorial Guide - which can be accessed through the Home | Help menu button
  • Re: Error in control center-parameter estimation

    [quote author=vivekanandan link=topic=1992.msg4497#msg4497 date=1394103043]
    yes, I got only 2 values in the runs table.
    [/quote]
    What do you mean?
    A Parameter Estimation experiment does not have a predetermined number of runs (like e.g. a Scenario Analysis) because it will sample the parameter space, and run the corresponding simulation, until the stop criterion is reached.
    So, in your case, I would have to conclude that after just 2 runs, your objective has been minimized. This is quite unlikely, so you need to check the experiment settings.

    [quote author=vivekanandan link=topic=1992.msg4497#msg4497 date=1394103043]
    In the runs plot, only histogram is showing.
    [/quote]
    Correct. That button (and this applies to all Advanced Experiments) is reserved for some "special" plots that could not be created otherwise - typically because data are to be gathered from different files.
    So, if your purpose is not to generate a histogram, you need to use the standard plot and either drag-drop quantities (if quantities belong to the models and are therefore listed in the Block Details) or use the "Add Series" item in the plot menu.
  • Re: Error in control center-parameter estimation

    Are you sure you have used the leading dot, i.e. ".ASU_1.C(S_O)" ?
    "ASU_1.C(S_O)" (note the missing dot) is incorrect and will indeed result in the error message you detect.
  • Re: Error in control center-parameter estimation

    The error message indicates that the quantity ".ASU_1.C(S_O)" is not present in the buffer (= the data file you have selected).
    Remember that WEST here expects a variable with a name that matches exactly that of the corresponding variable in the model.
    For instance: if you have renamed your ASU_1 tank, e.g. "Aer_Tank", you need to have the same exact label in the data file.
    Therefore two ways to fix this:
    - rename the tank on the Layout (property "Name"); or
    - change the column header in the data file
  • Re: How to link two Controllers to have a cascade control

    I believe the problem may be the OnOff controller for the DO. For a OnOff controller to be effectively controlled, both y_Min and y_Max need to be controlled (y_S is irrelevant ...). But, with the standard OnOff controller, you only have 1 outgoing signal: so from downstream (NH controller) to upstream (DO controller), you can only control 1 interface variable.
    This is why, you should rather use a P(ID) controller for the DO - in which only y_S needs to be controlled.
    I would therefore suggest the following:
    NH ctl [OnOff]: y_Min = 1.5, y_Max = 3, u_Off = 0, u_On = 1.5
    DO ctl [P(ID)]: can start off with all default
    Interface link: From = u, To = y_S
  • Re: values to M vector

    You can either set the values at the level of the project or of the model (in the MSL implementation of the relevant class).
    1) at the project level
    In the Block Details, enter the values in the Initial Values column - in fact, the only one that accepts inputs
    2) at the model level
    As I explained in another thread, the M object (in the standard model library) in defined in the wwtp.base.msl file (at around line 96).
    If you are working with one of the standard categories, you may alter the default values indicated for that particular category (confined between #ifdef <CategoryName> and #endif).
    If it's a custom category that you are working with, you'll need to add a whole block of code, similar to the ones you see for the default categories - and indicate the appropriate values.