Fortran Coder

查看: 524|回复: 1
打印 上一主题 下一主题

[求助] 有偿找人帮忙Fortran求解微分方程

[复制链接]

2

帖子

1

主题

0

精华

新人

F 币
13 元
贡献
5 点
跳转到指定楼层
楼主
发表于 2023-11-30 18:32:01 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
求visual studio2019版,Fortran2022版求解这种微分方程应该怎么编写代码啊,完全小白一点不懂,想得到s在不同的z(z可以只取总的高度下的几个有代表性的高度就行)下随时间t(t要分的细一点,想要得到的m值多一点)变化的值,我在网上拼拼凑凑瞎写了一下代码好像不能直接识别d和德尔塔,果然错,提示有很多问题,我也不知道咋改,有搜到要用四阶龙格库塔法,但我完全看不懂,球球大神救命!    program Composition
    implicit none
    ! Variables declaration
    real :: ca ! Specific heat capacity of dry air J /kg*k
    real :: cv ! specific heat capacity of water vapor J /kg*k
    real :: cg ! Specific heat capacity of dry grains J /kg*k
    real :: cw ! Specific heat capacity of liquid water J /kg*k
    real :: Tem ! Air temperature before drying ℃
    real :: H ! Absolute humidity of air before drying g/kg
    real :: b! Dry grain capacity kg/m³
    real :: G ! Grain weight t
    real :: t ! drying time s
    real :: z ! Height of grain pile m
    real :: r ! heat of vaporization of water  J/kg
    real :: S0 ! Initial moisture content of grain  kg/kg
    real :: S ! moisture content of grain  kg/kg
    real :: Se ! Grain Balance Moisture kg/kg
    real :: K ! Parameters of the thin-layer drying equation
    real :: a ! Parameters of the thin-layer drying equation
    !assigning values
    ca=1029
    cv=1880
    cg=3858
    cw=4200
    Tem=35
    H=12.9
    b=600
    G=100
    r=12200
    S0=0.03158
    z=3.75
    !Humidity control equation
    dH=-(b/G)*(dS/dt)*dz
    !Temperature control equation
    dTem=(((cv-cw)*Tem+r)*dS)/((cg++cw*S)+(cw-cv)*dS+(G/b)*(ca+cv*H)*(dt/dz))
    !Moisture control equation
    (S-Se)/(S0-Se)=exp(-K*(t**a))
    !Thin-layer drying equation
    dS/dt=-k*(S-Se)
    k=0.242261*exp(-2530.2/(Tem+273.15)
    !Initial boundary condition
    Tem(0,t)=Tem
    H(0,t)=H
    S(z,0)=S0
    write(*,*)"the drying time is: ", t
    ! output
    print *, "End-of-cereal moisture content=", S
     end program Composition

分享到:  微信微信
收藏收藏 点赞点赞 点踩点踩

2

帖子

1

主题

0

精华

新人

F 币
13 元
贡献
5 点
沙发
 楼主| 发表于 2023-11-30 18:34:26 | 只看该作者
我知道我根本没有用到什么微分方程求解的,因为根本看不懂
您需要登录后才可以回帖 登录 | 极速注册

本版积分规则

捐赠本站|Archiver|关于我们 About Us|小黑屋|Fcode ( 京ICP备18005632-2号 )

GMT+8, 2024-4-30 09:58

Powered by Tencent X3.4

© 2013-2024 Tencent

快速回复 返回顶部 返回列表