123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- package com.hb.proj.gather.process;
- import org.slf4j.Logger;
- import org.slf4j.LoggerFactory;
- import com.hb.proj.gather.model.WellMeasurePO;
- /**
- * 动液面相关数据计算
- * @author cwen
- *
- */
- public class LiquidCalculator {
-
- private static final Logger logger=LoggerFactory.getLogger(LiquidCalculator.class);
- /**
- * 计算折算动液面深度
- * 折算液面深度( m)=校正动液面深度(m)-(套压(动液面采集值MPa)/(混液密度(kg/l)*重力加速度(m/s2)))*1000
- * @param liquidDepth 校正动液面深度
- * @param casingPreDev 动液面采集套压
- * @param measure 测量数据对象
- * @return
- */
- public static Double calcConvertLiquidDepth(Double liquidDepth,Double casingPreDev,WellMeasurePO measure) {
-
- if(liquidDepth==null || casingPreDev==null || measure==null) {
- return null;
- }
-
- if(measure==null || measure.getMixLiquidDensity()==null || measure.getGravity()==null) {
- return null;
- }
-
- try {
- double rst=0;
- rst=(casingPreDev*1000)/(measure.getMixLiquidDensity()*measure.getGravity());
- rst=liquidDepth-rst;
- rst=Math.round(rst*100)*0.01;
-
- return rst;
- }
- catch(Exception e) {
- logger.error("折算动液面深度计算出错:{}",e.getMessage());
- return null;
- }
-
- }
-
- /**
- * 计算深度压差=折算动液面深度-折算静液面深度=折算动液面深度-最后一次静液测算时的折算液面深度
- * @param cvtLiquidDepth 折算动液面深度
- * @param cvtLiquidStaticDepth 折算静液面深度
- * @return
- */
- public static Double calcDepthDiff(Double cvtLiquidDepth,Double cvtLiquidStaticDepth) {
- if(cvtLiquidDepth==null || cvtLiquidStaticDepth==null) {
- return null;
- }
- return cvtLiquidDepth.doubleValue()-cvtLiquidStaticDepth.doubleValue();
- }
-
- /**
- * 计算流动压差KPa【压力(KPa)=(深度差(m)*液体密度(Kg/L)*重力加速度(m/s2))】
- * @param depthDiff
- * @param lastMeasure
- * @return
- */
- public static Double calcFlowPreeDiff(Double depthDiff,WellMeasurePO lastMeasure) {
- if(depthDiff==null || lastMeasure==null) {
- return null;
- }
-
- if(lastMeasure.getMixLiquidDensity()==null || lastMeasure.getGravity()==null) {
- return null;
- }
-
- return depthDiff.doubleValue()*lastMeasure.getMixLiquidDensity().doubleValue()*lastMeasure.getGravity().doubleValue();
- }
- }
|