-
-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Please check Modelica.Electrical.Analog.Examples.DemonstrateLightning.bmo. After the event at time = 1e-5 s, the results of the MTK simulation differ wildly from the reference result.
@AnHeuermann simulated the Base Modelica code with OMC and got results consistent with the reference results, so it seem that the flattening and Base Modelic exporting process is OK.
The issue is likely due to the two conditional equations
if time < 1e-5 then
'lightning1.signalSource.y' = 0.0;
else
'lightning1.signalSource.y' = 1e5 / 'lightning1.signalSource.eta' * (exp(-(time - 1e-5) / 'lightning1.signalSource.tau1') - exp(-(time - 1e-5) / 'lightning1.signalSource.tau2'));
end if;and
if time < 1e-5 then
'lightning2.signalSource.y' = 0.0;
else
'lightning2.signalSource.y' = 1e5 / 'lightning2.signalSource.eta' * ((time - 1e-5) / 'lightning2.signalSource.tau1') ^ 5.0 / (1.0 + ((time - 1e-5) / 'lightning2.signalSource.tau1') ^ 5.0) * exp(-(time - 1e-5) / 'lightning2.signalSource.tau2');
end if;as all other equation are simple linear DAEs.
Possibly related to #99.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working