点击查看代码
<?php
header('Content-Type: text/html; charset=utf-8');
define ('ROOT', $_SERVER['DOCUMENT_ROOT']);
include ROOT.'/assets/php/head.php';
$tit= '计算梁的箍筋根数已知长高和加密区非加密区';
//梁 长5600,高500,间隔 100 200
$val='5600 500 100 200';
$img='';
//调用方法
mill($val,$img,$tit);
//mill 是磨粉机的方法
function mill($val,$img,$tit){
//初始化
include ROOT.'/assets/php/init.php';
imgt($img,$tit);
//设置小数点保留位数
bcscale (2);
//$pi = round(pi(),2);
//以空格分割成数值
$vals = expl($val);
$a = evev($vals[0]);
$h = evev($vals[1]);
$m = evev($vals[2]);
$f = evev($vals[3]);
//已知条件
$know = array();
array_push($know, $val);
$v0 = eveq($vals[0]);
array_push($know, "梁的长度 a:$v0{$unit['mm']}");
$v1 = eveq($vals[1]);
array_push($know, "梁的高度 h:$v1{$unit['mm']}");
$v2 = eveq($vals[2]);
array_push($know, "箍筋的加密区 m:$v2{$unit['mm']}");
$v3 = eveq($vals[3]);
array_push($know, "箍筋的非加密区 f:$v3{$unit['mm']}");
//计算步骤
$step = array();
array_push($step, "计算无加密区的根数:n1");
array_push($step, "{$math['eq']} $a{$math['div']}$f{$math['add']}1");
$af = bcdiv($a, $f);
array_push($step, "{$math['eq']} $af{$math['add']}1");
$n1 = ceil($af+1);
array_push($step, "{$math['eq']} $n1");
array_push($step, "计算一级抗震的根数:n2");
array_push($step, "{$math['eq']} {$math['lsqb']}max(2*$h,500){$math['div']}$m{$math['rsqb']}{$math['mul']}2{$math['add']}{$math['lcub']}$a{$math['sub']}{$math['lsqb']}max(2*$h,500){$math['mul']}2{$math['rsqb']}{$math['rcub']}{$math['div']}$f{$math['add']}1");
$max2h500 = 2*$h>500?2*$h:500;
array_push($step, "{$math['eq']} {$math['lpar']}$max2h500{$math['div']}$m{$math['rpar']}{$math['mul']}2{$math['add']}{$math['lsqb']}$a{$math['sub']}{$math['lpar']}$max2h500{$math['mul']}2{$math['rpar']}{$math['rsqb']}{$math['div']}$f{$math['add']}1");
$max2h500m = bcdiv($max2h500,$m,0);
$max2h5002 = bcmul($max2h500,2);
array_push($step, "{$math['eq']} $max2h500m{$math['mul']}2{$math['add']}{$math['lpar']}$a{$math['sub']}$max2h5002{$math['rpar']}{$math['div']}$f{$math['add']}1");
$max2h500m2 = bcmul($max2h500m,2);
$amax2h5002 = bcsub($a, $max2h5002);
array_push($step, "{$math['eq']} $max2h500m2{$math['add']}$amax2h5002{$math['div']}$f{$math['add']}1");
$amax2h5002f = ceil(bcdiv($amax2h5002, $f));
array_push($step, "{$math['eq']} $max2h500m2{$math['add']}$amax2h5002f{$math['add']}1");
$n2 = ceil(bcadd($max2h500m2, $amax2h5002f+1));
array_push($step, "{$math['eq']} $n2");
array_push($step, "计算其他抗震的根数:n3");
array_push($step, "{$math['eq']} {$math['lsqb']}max(1.5*$h,500){$math['div']}$m{$math['rsqb']}{$math['mul']}2{$math['add']}{$math['lcub']}$a{$math['sub']}{$math['lsqb']}max(1.5*$h,500){$math['mul']}2{$math['rsqb']}{$math['rcub']}{$math['div']}$f{$math['add']}1");
$max15h500 = 1.5*$h>500?1.5*$h:500;
array_push($step, "{$math['eq']} {$math['lpar']}$max15h500{$math['div']}$m{$math['rpar']}{$math['mul']}2{$math['add']}{$math['lsqb']}$a{$math['sub']}{$math['lpar']}$max15h500{$math['mul']}2{$math['rpar']}{$math['rsqb']}{$math['div']}$f{$math['add']}1");
$max15h500m = bcdiv($max15h500,$m,0);
$max15h5002 = bcmul($max15h500,2);
array_push($step, "{$math['eq']} $max15h500m{$math['mul']}2{$math['add']}{$math['lpar']}$a{$math['sub']}$max15h5002{$math['rpar']}{$math['div']}$f{$math['add']}1");
$max15h500m2 = bcmul($max15h500m,2);
$amax15h5002 = bcsub($a, $max15h5002);
array_push($step, "{$math['eq']} $max15h500m2{$math['add']}$amax15h5002{$math['div']}$f{$math['add']}1");
$amax15h5002f = ceil(bcdiv($amax15h5002, $f));
array_push($step, "{$math['eq']} $max15h500m2{$math['add']}$amax15h5002f{$math['add']}1");
$n3 = ceil(bcadd($max15h500m2, $amax15h5002f+1));
array_push($step, "{$math['eq']} $n3");
//算出结果
$ends = array();
array_push($ends, "无加密区的根数:$n1");
array_push($ends, "一级抗震的根数:$n2");
array_push($ends, "其他抗震的根数:$n3");
//公式表示
$home = array();
array_push($home, "计算无加密区的根数:n1{$math['eq']}a{$math['div']}f{$math['add']}1");
array_push($home, "计算一级抗震的根数:n2{$math['eq']}{$math['lsqb']}max(2*h,500){$math['div']}m{$math['rsqb']}{$math['mul']}2{$math['add']}{$math['lcub']}a{$math['sub']}{$math['lsqb']}max(2*h,500){$math['mul']}2{$math['rsqb']}{$math['rcub']}{$math['div']}f{$math['add']}1");
array_push($home, "计算其他抗震的根数:n3{$math['eq']}{$math['lsqb']}max(1.5*h,500){$math['div']}m{$math['rsqb']}{$math['mul']}2{$math['add']}{$math['lcub']}a{$math['sub']}{$math['lsqb']}max(1.5*h,500){$math['mul']}2{$math['rsqb']}{$math['rcub']}{$math['div']}f{$math['add']}1");
//公式说明
$info = array();
array_push($info, "无加密区的根数 {$math['eq']} 梁长 {$math['div']} 非加密区 {$math['add']} 1");
array_push($info, "一级抗震的根数 {$math['eq']} {$math['lsqb']}max(2*梁高,500){$math['div']} 加密区 {$math['rsqb']}{$math['mul']}2{$math['add']}{$math['lcub']} 梁长 {$math['sub']}{$math['lsqb']}max(2*梁高,500){$math['mul']}2{$math['rsqb']}{$math['rcub']}{$math['div']} 非加密区 {$math['add']} 1");
array_push($info, "计算其他抗震的根数 {$math['eq']} {$math['lsqb']}max(1.5*梁高,500){$math['div']} 加密区 {$math['rsqb']}{$math['mul']}2{$math['add']}{$math['lcub']} 梁长 {$math['sub']}{$math['lsqb']}max(1.5*梁高,500){$math['mul']}2{$math['rsqb']}{$math['rcub']}{$math['div']} 非加密区 {$math['add']} 1");
array_push($info, "梁端加密区长度的规定出自《高规》表6.3.2-2(平法的编制依据即出于此),一级抗震时取2倍梁高,其余情况取1.5倍梁高,且任何情况下不小于500mm(两个加密区之间即为非加密区)。 ");
array_push($info, "假设梁截面为300mm*500mm,梁净跨为3000mm,一级抗震。则梁的加密区长度为:左加密区长度=max(2*500;500)=1000mm,右加密区长度=max(2*500;500)=1000mm,非加密区长度=3000mm-2*1000mm=1000mm。");
know($know);
ends($ends);
home($home);
step($step);
info($info);
}
?>
<?php include ROOT.'/assets/php/foot.php';
//写下记录
$note = array();
note($note);
?>
☁参考上图[22-12-22 chaoyi]
☀计算梁的箍筋根数已知长高和加密区非加密区
5600 500 100 200
梁的长度 a:5600㎜
梁的高度 h:500㎜
箍筋的加密区 m:100㎜
箍筋的非加密区 f:200㎜
♠算出结果
无加密区的根数:29
一级抗震的根数:39
其他抗震的根数:36
♥公式表示
计算无加密区的根数:n1=a÷f+1
计算一级抗震的根数:n2=[max(2*h,500)÷m]×2+{a−[max(2*h,500)×2]}÷f+1
计算其他抗震的根数:n3=[max(1.5*h,500)÷m]×2+{a−[max(1.5*h,500)×2]}÷f+1
♣计算步骤
计算无加密区的根数:n1
= 5600÷200+1
= 28.00+1
= 29
计算一级抗震的根数:n2
= [max(2*500,500)÷100]×2+{5600−[max(2*500,500)×2]}÷200+1
= (1000÷100)×2+[5600−(1000×2)]÷200+1
= 10×2+(5600−2000.00)÷200+1
= 20.00+3600.00÷200+1
= 20.00+18+1
= 39
计算其他抗震的根数:n3
= [max(1.5*500,500)÷100]×2+{5600−[max(1.5*500,500)×2]}÷200+1
= (750÷100)×2+[5600−(750×2)]÷200+1
= 7×2+(5600−1500.00)÷200+1
= 14.00+4100.00÷200+1
= 14.00+21+1
= 36
♦公式说明
无加密区的根数 = 梁长 ÷ 非加密区 + 1
一级抗震的根数 = [max(2*梁高,500)÷ 加密区 ]×2+{ 梁长 −[max(2*梁高,500)×2]}÷ 非加密区 + 1
计算其他抗震的根数 = [max(1.5*梁高,500)÷ 加密区 ]×2+{ 梁长 −[max(1.5*梁高,500)×2]}÷ 非加密区 + 1
梁端加密区长度的规定出自《高规》表6.3.2-2(平法的编制依据即出于此),一级抗震时取2倍梁高,其余情况取1.5倍梁高,且任何情况下不小于500mm(两个加密区之间即为非加密区)。
假设梁截面为300mm*500mm,梁净跨为3000mm,一级抗震。则梁的加密区长度为:左加密区长度=max(2*500;500)=1000mm,右加密区长度=max(2*500;500)=1000mm,非加密区长度=3000mm-2*1000mm=1000mm。
标签:加密,max,200014,add,区非,math,array,500
From: https://www.cnblogs.com/onestopweb/p/16999383.html