{"action":"created","issue":{"url":"https://api.github.com/repos/open-ideas/IDEAS/issues/463","repository_url":"https://api.github.com/repos/open-ideas/IDEAS","labels_url":"https://api.github.com/repos/open-ideas/IDEAS/issues/463/labels{/name}","comments_url":"https://api.github.com/repos/open-ideas/IDEAS/issues/463/comments","events_url":"https://api.github.com/repos/open-ideas/IDEAS/issues/463/events","html_url":"https://github.com/open-ideas/IDEAS/issues/463","id":138490366,"number":463,"title":"Strict asserts in EmbeddedPipe","user":{"login":"rubenbaetens","id":1235535,"avatar_url":"https://avatars.githubusercontent.com/u/1235535?v=3","gravatar_id":"","url":"https://api.github.com/users/rubenbaetens","html_url":"https://github.com/rubenbaetens","followers_url":"https://api.github.com/users/rubenbaetens/followers","following_url":"https://api.github.com/users/rubenbaetens/following{/other_user}","gists_url":"https://api.github.com/users/rubenbaetens/gists{/gist_id}","starred_url":"https://api.github.com/users/rubenbaetens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rubenbaetens/subscriptions","organizations_url":"https://api.github.com/users/rubenbaetens/orgs","repos_url":"https://api.github.com/users/rubenbaetens/repos","events_url":"https://api.github.com/users/rubenbaetens/events{/privacy}","received_events_url":"https://api.github.com/users/rubenbaetens/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/open-ideas/IDEAS/labels/bug","name":"bug","color":"e11d21"},{"url":"https://api.github.com/repos/open-ideas/IDEAS/labels/TME","name":"TME","color":"0052cc"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-03-04T14:35:08Z","updated_at":"2016-03-04T15:58:03Z","closed_at":null,"body":"The asserts in `IDEAS.Fluid.HeatExchangers.RadiantSlab.EmbeddedPipe` are very strict:\r\n```\r\ninitial equation \r\n   assert(m_flowMin/A_floor*Medium.specificHeatCapacityCp(sta_default)*(R_w_val_min + R_r_val + R_x_val)*nDiscr >= 0.5,\r\n     \"Model is not valid for the set nominal and minimal mass flow rate, discretisation in multiple parts is required\");\r\n  if RadSlaCha.tabs then\r\n    assert(RadSlaCha.S_1 > 0.3*RadSlaCha.T, \"Thickness of the concrete or screed layer above the tubes is smaller than 0.3 * the tube interdistance. \r\n    The model is not valid for this case\");\r\n    assert(RadSlaCha.S_2 > 0.3*RadSlaCha.T, \"Thickness of the concrete or screed layer under the tubes is smaller than 0.3 * the tube interdistance. \r\n      The model is not valid for this case\");\r\n  else\r\n    assert(RadSlaCha.alp2 < 1.212, \"In order to use the floor heating model, RadSlaCha.alp2 need to be < 1.212\");\r\n    assert(RadSlaCha.d_a/2 < RadSlaCha.S_2, \"In order to use the floor heating model, RadSlaCha.alp2RadSlaCha.d_a/2 < RadSlaCha.S_2 needs to be true\");\r\n    assert(RadSlaCha.S_1/RadSlaCha.T <0.3, \"In order to use the floor heating model, RadSlaCha.S_1/RadSlaCha.T <0.3 needs to be true\");\r\n  end if;\r\n```\r\n\r\nIs there a way to make them less strict, either by (a) describing the model in such way that it is more general, or (b) e.g. letting the asserts result in a warning instead of error.\r\n\r\nThere are some options concerning (a) i think, e.g.\r\n```\r\n  if RadSlaCha.tabs then\r\n    assert(RadSlaCha.S_1 > 0.3*RadSlaCha.T, \"Thickness of the concrete or screed layer above the tubes is smaller than 0.3 * the tube interdistance. \r\n  else\r\n    assert(RadSlaCha.S_1/RadSlaCha.T <0.3, \"In order to use the floor heating model, RadSlaCha.S_1/RadSlaCha.T <0.3 needs to be true\");\r\n  end if;\r\n```\r\n\r\ncould be reformulated based on `Boolean tabs  = (S_1 > 0.3*T)`.\r\n"},"comment":{"url":"https://api.github.com/repos/open-ideas/IDEAS/issues/comments/192333132","html_url":"https://github.com/open-ideas/IDEAS/issues/463#issuecomment-192333132","issue_url":"https://api.github.com/repos/open-ideas/IDEAS/issues/463","id":192333132,"user":{"login":"Mathadon","id":5970879,"avatar_url":"https://avatars.githubusercontent.com/u/5970879?v=3","gravatar_id":"","url":"https://api.github.com/users/Mathadon","html_url":"https://github.com/Mathadon","followers_url":"https://api.github.com/users/Mathadon/followers","following_url":"https://api.github.com/users/Mathadon/following{/other_user}","gists_url":"https://api.github.com/users/Mathadon/gists{/gist_id}","starred_url":"https://api.github.com/users/Mathadon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mathadon/subscriptions","organizations_url":"https://api.github.com/users/Mathadon/orgs","repos_url":"https://api.github.com/users/Mathadon/repos","events_url":"https://api.github.com/users/Mathadon/events{/privacy}","received_events_url":"https://api.github.com/users/Mathadon/received_events","type":"User","site_admin":false},"created_at":"2016-03-04T15:58:03Z","updated_at":"2016-03-04T15:58:03Z","body":"Your reformulation of `Boolean tabs = (S_1 > 0.3*T)` makes sense, but  I am also not sure whether this is correct. I only use the TABS version of the model and the FH implementation is from Roel."}}