• Re: Nitrogen removal in SBR

    This is tricky, as I don't have a clear view of your file and class structure.
    However, if you followed my instructions, word-by-word (he he) you should have:[list]
    [li]a [b]new CLASS[/b], SBRPointSettler_ContinuousFeed, in the "wwtp.base.SBR.msl" file - I would guess at the bottom, immediately above the set of #include statements. Anyway, what matters is that it's written in this file and therefore "visible" by the rest of the library[/li]
    [li]a [b]new file[/b], "wwtp.SBRPointsettler1PhaseReact_ContinuousFeed.msl" which contain 1 CLASS by the same name (i.e. SBRPointsettler1PhaseReact_ContinuousFeed) which, unlike the previous one, is associated to the icon "sbr" - this is what makes the ClassName appear in the drop-down in the WEST Properties pane[/li]
    [/list]

    Now, what's missing is that the rest of the library cannot "see" the new class, because the new file has not been included in its hierarchical structure.

    Add the following statement to the "wwtp.base.SBR.msl" file, right at the end, after #include "SBR/wwtp.base.SBR.sbrpointsettler8phasereact.msl":
    [code]#include "SBR/wwtp.base.SBR.sbrpointsettler1phasereact_ContinuousFeed"[/code]
  • Re: How to simulate an UASB

    Hi, I hope that other WEST users may have experience with this kind of application and can provide you with more concrete answers.

    I have briefly discussed this with some of our scientific collaborators, namely CEIT (Spain: http://ceit.es/index.php browse to Environmental Engineering) and University of kwaZulu-Natal (South Africa: http://prg.ukzn.ac.za/).
    CEIT developed a UASB model in WEST by combining an ASU tank (with anaerobic reactions) to a point settler (for retaining the biomass).
    One of the South African students is currently modeling a UASB system based on the new Plant-wide model which is included in WEST 2014.
  • Re: Controlling ethanol dosage to an SBR

    [quote]it seems like the Q_Waste is a constant flow, not an intermittent flow like in an SBR[/quote]
    Yes you're right: in CFID (and CFCD), there's a continuous underflow equal to the Q_Waste parameter.

    [quote]Is it possible to mimic the SBR process and let the flow Q_Waste be equal to zero except for a short period at the end of the draw phase?
    [/quote]
    Yes: but you need to modify either the base SBR so as to accept influent (i.e. not direct to by-pass) outside the fill phase; or the base CFID model so as to have no underflow but during a certain period.

    Regarding the numerical error: what other integrator did you try? I would imagine RK4 (fixed step size) although very slow, should not give that problem. Indeed, I don't believe there's anything wrong in the data file as such, but there may be a local sudden change (maybe a coarser time step in your data file compared to the sample one; of large step-change in some quantity). Best would be that you carefully inspect the time point at which it happens.
  • Re: Errors: "Non-existent key in Manager"

    Hi Moses, it's precisely "explaining this in a nutshell" which is nearly impossible :)
    Please send your case (and model library!) to Tech Support: mikebydhi@dhigroup.com
    Once we have identified the reason, we can post a solution here, so that other users may benefit.
  • Re: Controlling ethanol dosage to an SBR

    Hi, your layout looks ok - although the detailed settings of the models are evidently crucial here.
    Please, have a look at the following threads too:
    [list]
    [li]"Nitrogen removal in SBR"[/li]
    [li]"SBR & Desynchronization"[/li]
    [/list]
    you may find relevant information.
    I believe the issue is that you [b]cannot dose anything[/b] to an SBR [b]outside of the "fill" phase[/b] (T1): during all other phases, any inflow is directed to the by-pass. On the other hand, if you replace the data input (which provides a dosage of ethanol during T2R2) by a controller which gives a constant dosage, you may indeed detect some denitrification: but this is because ethanol enter the SBR during T1.

    If you really want to feed the SBR during other phases than the fill phase, you need to either modify the base model or consider one of the variants called CFCD or CFID (cf. the threads mentioned above).
  • Re: Sensor for soluble- and particulate COD

    You need to create a new CLASS (e.g. MultiSensor_New) which EXTENDS MultiSensor ... have a look at how the standard MultiSensor class is written.
    The body of your new class should have the following elements.

    [code]
    interface <-
    {
    OBJ y_SCOD ... fill in the relevant details here
    OBJ y_XCOD ... same as above
    };
    [/code]
    This will add 2 "probes" (i.e. output interface vars) to your model.

    [code]
    equations <-
    {
    #if (defined ASM1Temp)
    interface.y_SCOD =  IF (state.Q_In == 0) THEN 0
        ELSE (interface.Outflow[S_I] + interface.Outflow[S_S]) / state.Q_In ;
    interface.y_XCOD =  IF (state.Q_In == 0) THEN 0
        ELSE (interface.Outflow[X_BH] + interface.Outflow[X_I] + .Outflow[X_P] + interface.Outflow[X_S] + interface.Outflow[X_BA]) / state.Q_In ;
    #endif

    #if (defined ASM2dModTemp)
    interface.y_SCOD =  .. write equation here ..
    interface.y_XCOD =  .. write equation here ..
    #endif

    //ideally implement the 2 sensors for every category in the standard library
    };
    [/code]
    This implements the sensors
  • Re: Sensor for soluble- and particulate COD

    You are right, Tanya: these specific two quantities are [b]not[/b] made available in the [b]multi-probe sensor[/b] in WEST.
    What you could do is to modify the standard multi-probe model by adding those quantities - all the necessary elements are in fact available already in the model.
    Ideally, make a separate (derived) model and keep the original one.
  • Re: Anaerobic digestion in WEST

    Also have a look at previous posts on this argument. In particular, one entitled "ADM1 parameters" may provide you with some more insight.
  • Re: Anaerobic digestion in WEST

    [quote]... two dewatering units (1st static, 2nd dinamic -how should I mimic that?) ...[/quote]
    What do you mean by "static" vs. "dynamic" ?

    What you report suggests that the concentration of methane (S_ch4) in the "transformer out" (the interface ADM1/ASM1 after the digester) is negative. Now, what is the exact cause of this is impossible to say: you need to carefully inspect the current state (identify all the components that contribute to S_ch4 and you may be able to backtrack the specific trigger?), the influent (to the digester), the initial conditions, ..
    Especially [b]the initial conditions[/b] are crucial for the ADM1 !
    The set of default initial conditions works fine. Make sure that based on the actual volume of the digester, you rescale the initial masses ([b]vector M[/b]) accordingly.

    [i]To do so, you need to access the Block Details of the ADM1 model within the Digester "coupled model". Use the Model Explorer pane of WEST and select the submodel "Digester1"[/i]

    [quote]... inputs for the AD block ...[/quote]
    I would say, primarily, the temperature and the size (total and headspace volume). But, as I said: the initial conditions are critical ! you need to ensure that there's sufficient buffering capacity to prevent the pH from dropping - which is evidently what one would do in reality too. If I recall right, the key quantities are IC, INN, anions and cations.
  • Re: Sand Filters

    [quote]... the “Filtration period” and “Backwash Period” cannot alternate automatically between each other ... I find the parameter “Backwash” where I must decide to input a “1” or a “0” ...[/quote]
    Correct.
    "Backwash" is a [i]manipulated[/i] interface variable that should be linked to an input provider, e.g. input file or timer for scheduling, control model, ...
    The 1 state corresponds to backwash ON; 0 to backwash OFF.

    [quote]About the “Q_Backwash”, ...[/quote]
    "Q_Backwash" is a state variable of the model, i.e. computed: you can retrieve its value but not impose it.
    To impose a certain backwash intensity at a certain time, you are to set both interface variables "Backwash" (on/off) and "Inflow_Backwash". The latter carries the state vector (water + components).
    For instance, you could derive the backwash inflow from a buffer tank, at a given point in time and at the desired flow rate.

    The [b]actual hydraulics[/b] (simplified) of the model is as follows:
    [list]
    [li]Q_Filtered: 0 during backwash; Q_Backwash + Q_Out* during filtering[/li]
    [li]Q_Unfiltered: Q_In + Q_Backwash during backwash; Q_In - Q_Out* during filtering[/li]
    [/list]
    which, if you properly set the backwash inputs (i.e. make sure that Inflow_Backwash is 0 when Backwash is 0), guarantees that you don't have unfiltered flow during filtering.

    [quote]... how I could build a sand filter model of at least 2 lines working in parallel ...[/quote]
    You could:
    [list]
    [li]have the backwash from e.g. a buffer tank directed to one line (A) for a period - and set Backwash(A)=1 and Backwash(B)=0[/li]
    [li]simultaneously, divert the flow to be treated to line B[/li]
    [li]do the opposite for the second period[/li]
    [/list]
    Only be aware that such hard switches (0/1) may result in (local) numerical instability.