Please wait...
×

Error

Posted Mon, 14 Apr 2014 14:38:06 GMT by Ludwig Ehlert
Hello everybody,

i am currently in the need to use PEST to calibrate hydraulic conductivity and unsaturated Parameters (s_s, s_r and the fitting parameters alpha and n of the Van Genuchten model).

Since this is not working in FePest without developing a new Plugin i would like to use PEST in the classical way. I found a guide (http://www.feflow.com/uploads/media/pest_feflow.pdf)  which explains the basic steps for creating the input files but it refers to a available .dar file for extracting the results. Can i setup Feflow so that it will always save the .dar file with the new results after each run of the model? Or is there a possibility to extract the results somewhere else.
In my case it is a 2D, transient model with a simulation time of 110 days.

If maybe somebody already faced this problem and managed to develop the necessary coupling Plugin i would be glad if i could use it to proceed with my thesis.

Best Regards
Ludwig
Posted Tue, 15 Apr 2014 06:51:36 GMT by Giovanni Formentin
The batch mode keeps being the most powerful way, since FePEST is still limited in the parameters and observations you can use.
A .dar file is saved by inputing "feflow61c -dar filename.dar" (in you are running Feflow 6.1) in the command prompt.
Just type "feflow61c" in the command prompt to see all the options.
I hope I addressed your questions. Also consider contacting me privately, I may be of help since I struggled a lot around the coupling!

Giovanni
Posted Tue, 15 Apr 2014 07:22:21 GMT by Carlos Andres Rivera Villarreyes Global Product Specialist - FEFLOW
Hello,

From my experience with both classical PEST and FePEST graphical interface, I believe that time you will need to set-up a simple plug-in to assign unsaturated parameters in FePEST is much less than time needed for learning all PEST classical workflow.

Even though, if FePEST does not cover all available parameters in FEFLOW for calibration purposes, it helps you a lot to create simple PEST files (templates, instruction and control), which can be used as basis for another complex scenarios. For instance, you can setup a FePEST project with some dummy parameters, available in the interface. You just need to define the dummy parameter as "fixed", so it will be not taken into account for the optimization problem. Subsequently, you can create PEST files automatically and edit them manually according to your needs.

Calibration of high non-linear processes such as Richards-based models is very complex and time consuming. Even, you have a vertical cross-section, it would require several FEFLOW runs. Therefore, there will be the need to parallelize the problem in PEST/FePEST.

If you opt by using FePEST and a plug-in, basically you will need to use four API functions:

IfmSetMatUnsatAirEntryPressureHead
IfmSetMatUnsatFittingCoefficient
IfmSetMatUnsatMaximumSaturation
IfmSetMatUnsatResidualSaturation

Let me know if you require further information.

Carlos




Posted Tue, 15 Apr 2014 11:12:35 GMT by Giovanni Formentin
I agree with Carlos: FePEST speeds up dramatically the setup of a PEST problem.
You just have to take advantage of what comes with Feflow, also considering that knowing how to manage the original PEST files allows to flexibly choose the parameters and observations of interest (the last time I checked I couldn't choose, in FePEST, head differences as observations) and to build problems based on multiple models (e.g. a recharge estimation model followed by a gw model). Working in batch model may require some programming in order to manage the input and output from Feflow, which can eventually be avoided by using plugins (I'm guessing since I know too little about the API world).
A question to Carlos: can Feflow be parallelized with PEST in batch mode?
Thanks,

Giovanni
Posted Tue, 15 Apr 2014 11:41:22 GMT by Ludwig Ehlert
Hello,

I will try to develop the necessary plugin to assign the unsaturated parameters in Feflow. Since I am not used to programming this seems quite challenging. How is the assigning of the already existing parameters done in FePest? Is it a plugin as well? If yes, I would be interested to see how the Code looks like and maybe i could use the biggest part of this.

Is there any tutorial or help about which callbacks have to be used and which not?

Thanks for the help

Ludwig
Posted Tue, 15 Apr 2014 12:47:08 GMT by Carlos Andres Rivera Villarreyes Global Product Specialist - FEFLOW
Hello Giovanni and Ludwig,

@ Giovanni,
FePEST uses a third-party software named BeoPEST for parellalization of FEFLOW runs during the PEST optimization process. This means that FePEST will distribute some FEFLOW runs to several slaves (local, external or combination of both). External slaves can be stopped, restarted or initiated any time of the optimization progress.
In case of need for coupling several models, you can still do it with FePEST. In the automatically-generated PST files from FePEST, you will find a section "model command line" with the file named "run_model.bat". This batch file runs executable FEFLOW and PEST. Here you can place another model executable file if needed.

@ Ludwig,
From the FEFLOW website (Documentation section), you can get a short tutorial of setting-up a simple FePEST project in the User Manual of FEFLOW 6.2.  There is also some guidelines for IFM Programming, although this document is out-of-date, it is quite illustrative for beginners.
By the way, today we have a free webinar about FePEST, you may be interested... Register from our website.

Regards,

Carlos
Posted Tue, 15 Apr 2014 13:26:06 GMT by Ludwig Ehlert
Hello Carlos,

i already went through this documentation.

So far i understand the following workflow:

1. FePest can access parameters via the #IFM implemented# definition (There i assign a Definition/Name for the parameter which must be the same definition as in the plugin)
2. The plugin is calling the parameters in Feflow and assigning this identifying Definition/Name to them

Thereafter, FePest should be able to comunicate with Feflow and adjust the parameters in the Estimation process.

Am i right with this assumption? If, yes i assume that the plugin has just the function of assigning identifiers.

//Ludwig
Posted Tue, 15 Apr 2014 16:39:20 GMT by Ludwig Ehlert
Hello Carlos,

thank you for your answers in the Webinar. I would like to summarize them here so the forum can participate as well.

FePest is creating a blank parameter in the Pest directory as well as an additional template file. The Feflow plugin needs to extract the parameter which wants to be estimated from this file to the .fem. Than FePest knows the value and can calibrate it. The initial conditions probably need to be defined manually, as well as, the Pest results?

I have a few more questions to this procedure:

1. The time when the plugin is launched is defined by the callback function. This would be normally before the simulation starts so the new calibrated.
2. The template file is updated after every model run by Pest, so it is not sufficient to setup the IFM.tpl once on the beginning manually

Regards

Ludwig
Posted Tue, 15 Apr 2014 18:06:44 GMT by Carlos Andres Rivera Villarreyes Global Product Specialist - FEFLOW
Hi Ludwig,  could you please start/continue discussion in the FePest childboard of this forum?
I would like to organise a bit things.
Thanks,

Carlos
Posted Tue, 15 Apr 2014 18:21:08 GMT by Ludwig Ehlert
Of course, i will open a new topic in the FePest forum.

You must be signed in to post in this forum.