Home
W&WW Blog Case Histories Books Shop Amazon Member Survey Advertise ?
Buyer's Guide News Help Forum Ask Tom! Jobs Videos Online Training

Water and Wastewater.com Help Forums

Click here now

Search

Welcome, Guest. Please Login or Register
May 23rd, 2013, 2:47am
Top 10 Members
Runyan Sobisch Keenan Seghers Santa Cruz Gillen Kendall Orlebeke Ayrus Kersey
  HomeHelpSearchLoginRegister  
Poll Poll
Question: Unable to run ADM1

ADM1  
  1 (100%)
anaerobic digestion  
  0 (0%)




Total votes: 1
« Created by: juventus30 on: Apr 10th, 2013, 9:01am »

Pages: 1 2 3 4 
ADM1 (Read 8409 times)
Dmitri
YaBB Newbies
*
Offline

WaterandWastewa
ter.Com is the best!

Posts: 22

Re: ADM1
Reply #60 - Jun 6th, 2012, 11:53am
 
Hi,
I've yet to find a straightforward way to transform the following data

TS (g kg−1)      527.13 ± 7.47
VS (g kg−1)      521.52 ± 7.70
TKN (g kg−1)      10.75 ± 0.11
NH4+–N (mg kg−1)      274.51 ± 77.64
Proteinεκτιμώμενη (g kg−1)      65.48
Fatsoxtec (g kg−1)      432.07 ± 4.80
COD (g kg−1)      1356.03 ± 21.66
CODestimated (g kg−1)      1363.66
Flow (m3/d) 1000

to ADM1 input

Ssu = monosacharides (kg COD/m3)
Saa = amino acids (kg COD/m3)
Sfa = long chain fatty acids (LCFA) (kg COD/m3)
Sva = total valerate (kg COD/m3)
Sbu = total butyrate (kg COD/m3)
Spro = total propionate (kg COD/m3)
Sac = total acetate (kg COD/m3)
Sh2 = hydrogen gas (kg COD/m3)
Sch4 = methane gas (kg COD/m3)
Sic = inorganic carbon (kmole C/m3)
Sin = inorganic nitrogen (kmole N/m3)
Si = soluble inerts (kg COD/m3)
Xc = composites (kg COD/m3)
Xch = carbohydrates (kg COD/m3)
Xpr = proteins (kg COD/m3)
Xli = lipids (kg COD/m3)
Xsu = sugar degraders (kg COD/m3)
Xaa = amino acid degraders (kg COD/m3)
Xfa = LCFA degraders (kg COD/m3)
Xc4 = valerate and butyrate degraders (kg COD/m3)
Xpro = propionate degraders (kg COD/m3)
Xac = acetate degraders (kg COD/m3)
Xh2 = hydrogen degraders (kg COD/m3)
Xi = particulate inerts (kg COD/m3)
scat+ = cations (metallic ions, strong base) (kmole/m3)
san- = anions (metallic ions, strong acid) (kmole/m3)

any suggestions?
Back to top
 
 
  IP Logged
BendelBoy
Senior Member
****
Offline

Free the STOAT

Posts: 317

Gender: male

Company or Organization: wrc plc
Re: ADM1
Reply #61 - Jun 6th, 2012, 3:02pm
 
Very simple one.

1. Are the unit of g/kg effectively g/kg wet sludge?
2. Assume all VS degradable.
3. Set Xc = COD
4. Set Inorganic N = NH4
5. Set model parameters for stoichiometry (carbohydrates, fats, proteins) rom your measured COD, fats, proteins (carbohydrates by difference). Find acceptable values for COD equivalent of your fats/proteins.
6. Set biomass values to a nominal value - try 0.1 mg/l.
7. Set other values to zero.
8. Experiment with cation/anion to get pH balance.

What I often do is to proportion using sewage rules:

1. COD 90% degradable.
2. Particulate COD = 1.42 x VS
3. Soluble COD by difference
4. Ammonia as measured
5. Organic N pro-rata to match TKN
6. Use the ASM1 - > ADM1 converter to complete the fractionation.
7. Adjust cations/anions to get reasonable pH balance.
Back to top
 
 
  IP Logged
andre2503
YaBB Newbies
*
Offline

I love Water and
Wastewater.com

Posts: 10


Company or Organization: UFSM
Re: ADM1
Reply #62 - Jun 26th, 2012, 12:37pm
 
Hi

I have almost the same problem, I am working with stillage from distillation of sugar cane, but I have few measures:

DQO 35900mg/l
DBO 6210mg/l
Nitrogen  574mg/l
Phosphorus  436,84mg/l
SS.   22,98mg/l
TS 308mg/l
TSS 46 mg/l

Is there any approximation that i can use?
What simple measure I should do?

Thanks
Back to top
 
 
  IP Logged
BendelBoy
Senior Member
****
Offline

Free the STOAT

Posts: 317

Gender: male

Company or Organization: wrc plc
Re: ADM1
Reply #63 - Jun 26th, 2012, 2:03pm
 
What is SS?

I read your data as

COD               35 900 mg/l
BOD                 6 210 mg/l
Nitrogen              574 mg/l
Phosphorus         437 mg/l
Total Solids         308 mg/l
Filtered solids        46 mg/l
Settleable solids.   23 mg/l

ADM1 ignores phosphorus ... which is a weakness. But simplifies things for you here.
Filtered solids tells you that you could approximate your feed as purely soluble.

BOD is harder. *If* your BOD test was acclimated then much of your COD is non-degradable. I find that odd in cane-sugar stillage.

I would still suggest using the ASM1  to ADM1 model as a guide to doing the conversion; you can either set degradable COD = BOD / 0.68 (traditional sewage rule of thumb) or you could consider (given the waste origins) setting COD to be 100% degradable, 100% soluble.
Back to top
 
 
  IP Logged
andre2503
YaBB Newbies
*
Offline

I love Water and
Wastewater.com

Posts: 10


Company or Organization: UFSM
Re: ADM1
Reply #64 - Jun 26th, 2012, 2:16pm
 
Thanks

I will consider COD = 100% degradable and 100% soluble.

Back to top
 
 
  IP Logged
andre2503
YaBB Newbies
*
Offline

I love Water and
Wastewater.com

Posts: 10


Company or Organization: UFSM
Re: ADM1
Reply #65 - Jun 26th, 2012, 2:22pm
 
And you read correct, i put some measures in Portuguese, my mistake.

We have few materials to do the analysis, so I intend to save time and money and work with this data.

I now I am trying to run the ADM1, it's hard but I will continue.

Thanks again
Back to top
 
 
  IP Logged
Dmitri
YaBB Newbies
*
Offline

WaterandWastewa
ter.Com is the best!

Posts: 22

Re: ADM1
Reply #66 - Jun 30th, 2012, 6:01am
 
BendelBoy wrote on Jun 26th, 2012, 2:03pm:
I would still suggest using the ASM1  to ADM1 model as a guide to doing the conversion; you can either set degradable COD = BOD / 0.68 (traditional sewage rule of thumb) or you could consider (given the waste origins) setting COD to be 100% degradable, 100% soluble.


I am following you valuable advices but I think I have small problem with results interpretation

BOD5      32747      mg/l
VS              34924      mg/l
COD              80310      mg/l
ΤΝ                4870      mg/l


1) Case 1
What I am doing is breaking COD to X_ch, X_pr, X_li and  X_I,
next all TN => Sin (kmol/m3)
I disregard tottaly VS

Following this i have accepted biogas production (within bibliographical data), but VFA destruction is almost 22% and not whithin the 40~60% as it should be. Also, I have ~90% total COD destruction (while I think it should be 40-70%)

2) Case 2
I am not breaking COD at all, instead assign  COD = Xc = composites (kg COD/m3)

Following this i have double biogas production (not according to bibliographical data)

3) Case 3

I am not breaking COD at all, instead assign  1/2 COD = Xc = composites (kg COD/m3)
and VS to Sac = total acetate (kg COD/m3)

Following this i have triple biogas production (not according to bibliographical data)

I am attaching my results printout for case 1. Your opinion would be really great
thanks
https://www.dropbox.com/s/aemxqsg8g1r7q43/case1.txt
Back to top
 
 
  IP Logged
andre2503
YaBB Newbies
*
Offline

I love Water and
Wastewater.com

Posts: 10


Company or Organization: UFSM
Re: ADM1
Reply #67 - Jul 4th, 2012, 1:33pm
 
Hello
I'm having problems relating to the model and would like to help.
I'll summarize what I propose:
Basically wish to model the anaerobic digestion for the treatment of vinasse (or stillage)
The particular case is that the vinasse is coming from a small scale distillery, which works in batch, not continuous, and it increases its percentage of alcohol in the stillage.
At its low pH, is fixed and enters the system with pH around 5.8 to 7. Due to low nutrient concentration, is also added N and P to obtain the ratio of 100:5:1.

Since the data
COD 35 000 mg/ l
Total Solids 308 mg / l
Solids filtered 46 mg / l
Settleable solids. 23 mg / l

I wonder then if the ADM1 is really the best method for predicting amount of gas generated and degradation of COD.
Or is there some other alternative that seems more consistent?

Your opinion would be really great thanks.
Back to top
 
 
  IP Logged
BendelBoy
Senior Member
****
Offline

Free the STOAT

Posts: 317

Gender: male

Company or Organization: wrc plc
Re: ADM1
Reply #68 - Jul 9th, 2012, 4:19pm
 
ADM1 is probably the best readily-available anaerobic digester model.

Of digester models that would predict the methane content I am aware of

Mosey - poorly documented for calibration; difficult to set up and run reliably
Droste - fairly simple
Siegrist - no experience
Vavilin's - seemed to have the have same problems of getting to run reliably when we used it, back in the days when it was available as a DOS program
Various units in GPS-X: no real experience; one is in the Droste mould, another in the ADM1 mould
Biowin - no experience; documentation does not let you know fully what processes are modelled

and then ADM1

widely used; free MATLAB implementation available; I have used the STOAT version which (mostly) produces sensible results, and seems easier to use than the Mosey model, and more realistic than the Droste. ADM1 used in various academic projects looking at food, food & sewage, and agricultural waste anaerobic digestion.

Not easy to see a good reason why not to start with ADM1 and look at alternatives only after deciding that ADM1 is not suitable - either through being too complex (try Droste) or not including processes important to you (such as sulphur or phosphorous cycles)
Back to top
 
 
  IP Logged
karbo
YaBB Newbies
*
Offline

I love Water and
Wastewater.com

Posts: 1


Company or Organization: UON
Re: ADM1
Reply #69 - Jul 26th, 2012, 7:35am
 
Hi Guys,

Im new to this forum, i have contacted Ulf and got the code from him which was great, however it has been a while since i used MATLAB and simulink, i was wondering if anyone can point me in the right direction for specifics when it comes to running the ADM1 simulink system. the particular problem im having is when i open the model and click on run, it says "Error in S-function 'ADM1_R14/ADM1': S-Function 'adm1_ODE' does not exist". But i can see that the mexmac file is there in my working directory. Hopefully im missing something fundamental, please help?!

Thanks,
Back to top
 
 
  IP Logged
BendelBoy
Senior Member
****
Offline

Free the STOAT

Posts: 317

Gender: male

Company or Organization: wrc plc
Re: ADM1
Reply #70 - Aug 1st, 2012, 7:00am
 
Have you purchased Simulink?

Have you set your working directory to the folder holding all the ADM1 files?

Those are the two most likely explanations I can think of.
Back to top
 
 
  IP Logged
Dmitri
YaBB Newbies
*
Offline

WaterandWastewa
ter.Com is the best!

Posts: 22

Re: ADM1
Reply #71 - Aug 1st, 2012, 7:20am
 
karbo wrote on Jul 26th, 2012, 7:35am:
Hi Guys,

Im new to this forum, i have contacted Ulf and got the code from him which was great, however it has been a while since i used MATLAB and simulink, i was wondering if anyone can point me in the right direction for specifics when it comes to running the ADM1 simulink system. the particular problem im having is when i open the model and click on run, it says "Error in S-function 'ADM1_R14/ADM1': S-Function 'adm1_ODE' does not exist". But i can see that the mexmac file is there in my working directory. Hopefully im missing something fundamental, please help?!

Thanks,


Hi, I think I had similar problem with yours.

First, rename or remove .mex files provided by Ulf.
Next, recreate those files with mex command from provided c++ source files.
After that just run simulink simulation.

Back to top
 
 
  IP Logged
andre2503
YaBB Newbies
*
Offline

I love Water and
Wastewater.com

Posts: 10


Company or Organization: UFSM
Re: ADM1
Reply #72 - Aug 24th, 2012, 11:14am
 
Hi

I'm having problems with my characterization of the effluent to the ADM1 model.

I am able to run the model and data from other articles answers are accurate, but still can not define a right strategy for the characterization of the effluent.

I tried to use the strategy that Zaher used, but I think that is best suited for solid waste. I wonder what the best strategy and if there is something new in the field to implement the characterization directly to ADM1.

Thanks
Back to top
 
 
  IP Logged
BendelBoy
Senior Member
****
Offline

Free the STOAT

Posts: 317

Gender: male

Company or Organization: wrc plc
Re: ADM1
Reply #73 - Aug 24th, 2012, 5:53pm
 
What values did you use?
Back to top
 
 
  IP Logged
andre2503
YaBB Newbies
*
Offline

I love Water and
Wastewater.com

Posts: 10


Company or Organization: UFSM
Re: ADM1
Reply #74 - Aug 27th, 2012, 12:37pm
 
I got this results from analyzes:
COD                 50000 mg/l
BOD                 20000 mg/l
Nitrogen              1000 mg/l
Phosphorus          250  mg/l
Total Solids         308 mg/l

I tried break the COD to X_ch, X_pr, X_li and  X_I, next all TN => Sin (kmol/m3)

But didn't work.

I would like a better strategy to put the data in the correct manner.

My effluent is vinasse(stillage) from a small scale distillery working with sugar cane.

Would require more analysis of this effluent to the best use of ADM1?
Thanks
Back to top
 
 
  IP Logged
BendelBoy
Senior Member
****
Offline

Free the STOAT

Posts: 317

Gender: male

Company or Organization: wrc plc
Re: ADM1
Reply #75 - Aug 28th, 2012, 4:10am
 
Most of your COD is soluble.

So I would try X_COD = 1.48 x TSS
                    X_ch     = 0.9 x X_COD
                    X_I       = X_COD - X_ch
                    S_su     = COD - X_COD

and see what happens.
Back to top
 
 
  IP Logged
andre2503
YaBB Newbies
*
Offline

I love Water and
Wastewater.com

Posts: 10


Company or Organization: UFSM
Re: ADM1
Reply #76 - Aug 28th, 2012, 3:41pm
 
I tried to use your chacterization and I have better results.

I would to receive some references to try another ways.

Thanks a lot.
Back to top
 
 
  IP Logged
BendelBoy
Senior Member
****
Offline

Free the STOAT

Posts: 317

Gender: male

Company or Organization: wrc plc
Re: ADM1
Reply #77 - Aug 28th, 2012, 6:04pm
 
Dear Andre,

For references on characterisation search generally on wastewater characterisation.

Typically you can assume that suspended solids are 75% volatile; that volatile solids exert a COD of 1.48 mg COD per mg VSS; that 90% of COD is degradable; and from that the rest follow by a mass balance. The degradable fraction can be as low as 50%; more commonly is 80-90%. Brewery wastes are famously high in soluble readily degradable material - but it is still present as sugars or ethanol, rather than lower VFAs.
Back to top
 
 
  IP Logged
andre2503
YaBB Newbies
*
Offline

I love Water and
Wastewater.com

Posts: 10


Company or Organization: UFSM
Re: ADM1
Reply #78 - Sep 18th, 2012, 2:46pm
 
Hello

The characterization of the effluent has been made ​​and the inoculum also some doubts, but followed the usual made ​​for effluent characterization.

I wonder if anyone has worked with the manipulation of time of detention or retention time. If yes, where the manipulation was done, because I'm doing this, but I did not find corroborating article or work with this manipulation.

Thanks a lot
Back to top
 
 
  IP Logged
BendelBoy
Senior Member
****
Offline

Free the STOAT

Posts: 317

Gender: male

Company or Organization: wrc plc
Re: ADM1
Reply #79 - Sep 19th, 2012, 3:06am
 
What do you mean by manipulating retention time?

The code is written around a fixed digester volume. as the flow rate varies the retention time will automatically vary. If you want to have a varying digester volume you need to modify the MATLAB code.
Back to top
 
 
  IP Logged
andre2503
YaBB Newbies
*
Offline

I love Water and
Wastewater.com

Posts: 10


Company or Organization: UFSM
Re: ADM1
Reply #80 - Sep 19th, 2012, 6:06pm
 
Hell

I just change the input flow, leaving the fixed volume in the volume of the reactor experiment.

But now I'm working on a reactor that different. It is a UASB reactor, but has recirculation, so I thought if would simulate a retention time different from what is done usually.

Because the input flow is always the same, and the reactor volume as well, just vary the amount of time the reactor is recirculating the same volume.

Sorry if it is hard to understand.

Thanks a lot
Back to top
 
 
  IP Logged
BendelBoy
Senior Member
****
Offline

Free the STOAT

Posts: 317

Gender: male

Company or Organization: wrc plc
Re: ADM1
Reply #81 - Sep 20th, 2012, 3:13am
 
Why not extend the Matlab/Simulink code to have a recycle from the digester? With a UASB you would also want solids separation from the effluent. A full UASB model would be complex, as you would have gassed solids rising to the degasser, and degassed solids settling down the reactor. Although some of the simulation packages include a 'UASB' model I think they represent it as settled solids being returned via a recycle to the base of the reactor, rather than settling down; how this affects the process model matching a true UASB I do not know.

You might find more details on the Linked-In group for anaerobic digestion.
Back to top
 
 
  IP Logged
adm1learner
YaBB Newbies
*
Offline

I love Water and
Wastewater.com

Posts: 4


Company or Organization: Uni
Re: ADM1
Reply #82 - Jan 9th, 2013, 12:27am
 
Hi Everyone
I too am working on an ADM1 implementation.
I have started by attempting to replicate Ulf's work in Matlab following the equations and data given in the 'Aspects on ADM1 Implementation within the BSM2 Framework' paper. I have gone over it a few times now and am not getting the same output as Ulf.
I am trying to use the ode15s solver in Matlab. I am using the S_h+ solver but not the Sh2 solver at this point as I am getting relatively quick solving speeds as it is.

I am unsure about the initial conditions, particularly those related to initial gas concentrations (Sgas,h2/ch4/co2) pressures, and ion concentrations. Can somebody point me in the right direction with these? I currently have them set to 0 (which causes an initial negative q_gas).

As far as I can see, my equations and variables are exactly the same as Ulf so it is frustrating I cannot move past this point.
Back to top
 
 
  IP Logged
BendelBoy
Senior Member
****
Offline

Free the STOAT

Posts: 317

Gender: male

Company or Organization: wrc plc
Re: ADM1
Reply #83 - Jan 9th, 2013, 4:31am
 
The easiest thing is to contact Ulf and request a copy of his Matlab code. Otherwise the difference may be a bug/typo in your code.

We found that ion concentrations of zero can make the model unstable, and fail to produce digester gas.

Initial gas pressure should be at least atmospheric, and perhaps with a little overpressure.

Initial gas concentrations should be set to give you CO2 35% by mole fraction, 65% CH4 by mole fraction, and H2 a few ppm.
Back to top
 
 
  IP Logged
adm1learner
YaBB Newbies
*
Offline

I love Water and
Wastewater.com

Posts: 4


Company or Organization: Uni
Re: ADM1
Reply #84 - Jan 9th, 2013, 5:51pm
 
BendelBoy - I made your suggested adjustments to my initial conditions without success - I still end up with the same equilibrium outputs.

I think you are right - there must be an issue somewhere in my program. I will try contacting Ulf.
Back to top
 
 
  IP Logged
adm1learner
YaBB Newbies
*
Offline

I love Water and
Wastewater.com

Posts: 4


Company or Organization: Uni
Re: ADM1
Reply #85 - Jan 10th, 2013, 6:27pm
 
Update: I have received the files from Ulf.
However, I am having some trouble understanding how it works. Could someone please give me a step-by-step walk through on how to work everything? I have had at the previous posts here but still can't manage to get it.
Thanks =)
Back to top
 
 
  IP Logged
adm1learner
YaBB Newbies
*
Offline

I love Water and
Wastewater.com

Posts: 4


Company or Organization: Uni
Re: ADM1
Reply #86 - Jan 10th, 2013, 11:07pm
 
Just some extra details: I have gotten rid of the mexmac files and have the correct ones now. When I go to run Simulink, I get the error:
Error evaluating parameter 'VariableName' in 'ADM1_R14/From Workspace'

Caused by:
   Not enough input arguments.

Does anyone know how to fix this?
Back to top
 
 
  IP Logged
BendelBoy
Senior Member
****
Offline

Free the STOAT

Posts: 317

Gender: male

Company or Organization: wrc plc
Re: ADM1
Reply #87 - Jan 11th, 2013, 4:17am
 
Yes. The message relates to not having loaded the parameter & variable data files. I'll try & send you and e-mail with my notes - I can't upload the screen shots into this forum.
Back to top
 
 
  IP Logged
anish
YaBB Newbies
*
Offline

I love Water and
Wastewater.com

Posts: 4

Gender: male

Company or Organization: Student
Re: ADM1
Reply #88 - Feb 22nd, 2013, 5:28am
 
Hello all,

I am a student researcher learning modelling of wastewater treatment. I would be grateful if anyone could provide me ADM1 MATLAB files.

Thanks!
Back to top
 
 

M.E. in Environmental Engineering
  IP Logged
BendelBoy
Senior Member
****
Offline

Free the STOAT

Posts: 317

Gender: male

Company or Organization: wrc plc
Re: ADM1
Reply #89 - Feb 22nd, 2013, 5:37am
 
The preferred way of getting the files is to contact Ulf Jeppson. His contact details are at http://www.iea.lth.se/ielulf/. Since he is the provider of the Matlab code it is best if he knows who is using it, so that he can pass on any bug fixes.

After you have the code I, and others on this forum, will do what we can to provide you with help. If you need some 'getting started' notes I can provide them.
Back to top
 
 
  IP Logged
Pages: 1 2 3 4