Dear Kenza,
you can't do it like this, because you set-up the point sources
initially and then you don't call this function in every time step.
However, you can pass a lambda function instead which is then evaluated
in each time step.
You can find an example of how this works in
https://git.iws.uni-stuttgart.de/dumux-repositories/dumux/-/blob/master/test/porousmediumflow/richardsnc/problem.hh
Here, the point source value can be chosen time-dependent.
Alternatively, you can do it as indicated in the test
https://git.iws.uni-stuttgart.de/dumux-repositories/dumux/-/blob/master/test/porousmediumflow/solidenergy/problem.hh
where you implement the additional *pointSource *function to update the
source value.
Best regards,
Martin
On 02.05.22 13:24, kenza bouznari wrote:
Hello Dumux users,
I have tried to impose a time to end gas injection in my domain.
To inject the gas, I use addPointSource and so in this function I add
the condition of the time I want as follows:
void addPointSources(std::vector<PointSource>& pointSources) const.
{
if ( time_ < injectionFin_)
{
pointSources.push_back(PointSource({30.00, 0.00}, {0,
InjectionRate_})) ;
}
}
The injection continues even after the simulation has reached the
"injectionFin_" time!
P.S.: I use the "2p2c / injection" test. I have attached the following
files:
parms.input; problem.hh and main.cc
Any help will be appreciated. Thanks in advance for your time!
Best regards,
Kenza
_______________________________________________
DuMux mailing list
[email protected]
https://listserv.uni-stuttgart.de/mailman/listinfo/dumux
_______________________________________________
DuMux mailing list
[email protected]
https://listserv.uni-stuttgart.de/mailman/listinfo/dumux