{"action":"created","issue":{"url":"https://api.github.com/repos/tbeu/Modelica/issues/321","repository_url":"https://api.github.com/repos/tbeu/Modelica","labels_url":"https://api.github.com/repos/tbeu/Modelica/issues/321/labels{/name}","comments_url":"https://api.github.com/repos/tbeu/Modelica/issues/321/comments","events_url":"https://api.github.com/repos/tbeu/Modelica/issues/321/events","html_url":"https://github.com/tbeu/Modelica/issues/321","id":196330514,"number":321,"title":"Vessel initialization fails because of division by zero (m(t=0)=0 is the default)","user":{"login":"modelica-trac-importer","id":22202507,"avatar_url":"https://avatars.githubusercontent.com/u/22202507?v=3","gravatar_id":"","url":"https://api.github.com/users/modelica-trac-importer","html_url":"https://github.com/modelica-trac-importer","followers_url":"https://api.github.com/users/modelica-trac-importer/followers","following_url":"https://api.github.com/users/modelica-trac-importer/following{/other_user}","gists_url":"https://api.github.com/users/modelica-trac-importer/gists{/gist_id}","starred_url":"https://api.github.com/users/modelica-trac-importer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/modelica-trac-importer/subscriptions","organizations_url":"https://api.github.com/users/modelica-trac-importer/orgs","repos_url":"https://api.github.com/users/modelica-trac-importer/repos","events_url":"https://api.github.com/users/modelica-trac-importer/events{/privacy}","received_events_url":"https://api.github.com/users/modelica-trac-importer/received_events","type":"User","site_admin":false},"labels":[{"id":503143283,"url":"https://api.github.com/repos/tbeu/Modelica/labels/bug","name":"bug","color":"ee0701","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2016-12-19T04:45:09Z","updated_at":"2016-12-19T04:48:29Z","closed_at":null,"body":"**Reported by mwetter on 13 Jan 2009 00:15 UTC**\nThe newly added test model\nModelica_Fluid.Test.TestComponents.Vessels.TestInitialization\nfails with\nError: Singular inconsistent scalar system for der(vol1.medium.u) = (der(vol1.m)*vol1.medium.u-der(vol1.U))/( -vol1.m) = -1.85962e+007/-0\n\nThe reason is that it assumes a fixed default value for vol1.m(start=0).\n\nThis model uses default parameters for the volume initialization and therefore we should fix the problem.\n\nChanging in Modelica_Fluid.Vessels.Volume the code snippet\n  extends Modelica_Fluid.Vessels.BaseClasses.PartialLumpedVessel(\n    final fluidVolume = V,\n    heatTransfer(surfaceAreas={4*pi*(3/4*V/pi)^(2/3)}));\nto \n  extends Modelica_Fluid.Vessels.BaseClasses.PartialLumpedVessel(\n    final fluidVolume = V,\n    m(start=V*rho0, fixed=false),\n    heatTransfer(surfaceAreas={4*pi*(3/4*V/pi)^(2/3)}));\nprotected \n   parameter Medium.ThermodynamicState sta0 = Medium.setState_pTX(T=T_start,\n         p=p_start, X=X_start[1:Medium.nXi]);\n   parameter Modelica.SIunits.Density rho0=Medium.density(sta0) \n    \"Density, used to compute fluid mass\";\nfixes the division by zero.\n\nIs this the correct place to provide the start value, or is there a better solution? I would prefer to set the start value at a sub class, but the parameter V is only known at this level of the class hierarchy.\n\nMigrated-From: https://trac.modelica.org/Modelica/ticket/321"},"comment":{"url":"https://api.github.com/repos/tbeu/Modelica/issues/comments/267881331","html_url":"https://github.com/tbeu/Modelica/issues/321#issuecomment-267881331","issue_url":"https://api.github.com/repos/tbeu/Modelica/issues/321","id":267881331,"user":{"login":"modelica-trac-importer","id":22202507,"avatar_url":"https://avatars.githubusercontent.com/u/22202507?v=3","gravatar_id":"","url":"https://api.github.com/users/modelica-trac-importer","html_url":"https://github.com/modelica-trac-importer","followers_url":"https://api.github.com/users/modelica-trac-importer/followers","following_url":"https://api.github.com/users/modelica-trac-importer/following{/other_user}","gists_url":"https://api.github.com/users/modelica-trac-importer/gists{/gist_id}","starred_url":"https://api.github.com/users/modelica-trac-importer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/modelica-trac-importer/subscriptions","organizations_url":"https://api.github.com/users/modelica-trac-importer/orgs","repos_url":"https://api.github.com/users/modelica-trac-importer/repos","events_url":"https://api.github.com/users/modelica-trac-importer/events{/privacy}","received_events_url":"https://api.github.com/users/modelica-trac-importer/received_events","type":"User","site_admin":false},"created_at":"2016-12-19T04:48:28Z","updated_at":"2016-12-19T04:48:28Z","body":"**Modified by rfranke on 25 Jan 2009 10:59 UTC**"}}
{"actor":{"display_login":"modelica-trac-importer"}}