fluent scheme 之 xyplot 功能

本文详细介绍了在FLUENT软件中利用xyplot功能绘制曲线的方法,包括实例演示、参数设置及GUI操作技巧。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

在 FLUENT 中,利用 xyplot 功能可以绘制一些曲线,查看某些变量随某一参数的变化情况。


还是先给出一个例子吧。


(define (hy-write-xyplot-file-2 fn v1 v2 v3 title labels llabels)
  (let
    ((p (open-output-file fn)))
    (newline)
    (format p "(title \"~a\")" title)
    (newline p)
    (format p "(labels \"~a\" \"~a\")" (car labels) (cadr labels))
    (newline p)
    (newline p)
    (format p "(")
    (newline p)

    ;
    (format p "(xy/line/pattern \"----\")")
    (format p "(xy/marker/symbol \"()\")")
    (format p "(xy/marker/size 0.6)")
    (format p "(xy/scale/label/y \"~a\") " (car labels))
    (format p "(xy/key/label \"~a\")" (car llabels))
    (format p "(xy/key/legend \"~a\")" (cadr labels))
    (format p "(xy/key/border? #f)")
    (newline p)

    (do ((i  0 (+ i 1)))
      ((>= i (length v1)))
      (begin
        (format p "~a ~a" (list-ref v1 i) (list-ref v2 i))
        (newline p)
      )
    )

    (newline p)
    (format p ")")
    (newline p)

    (newline p)
    (newline p)
    (format p "(")
    (newline p)

    ;
    (format p "(xy/line/pattern \"----\")")
    (format p "(xy/marker/symbol \"[]\")")
    (format p "(xy/marker/size 0.6)")
    (format p "(xy/scale/label/y \"~a\") " (cadr labels))
    (format p "(xy/key/label \"~a\")"  (cadr llabels))
    (format p "(xy/key/legend \"~a\")" (cadr labels))
    (format p "(xy/key/border? #f)")
    (newline p)

    (do ((i  0 (+ i 1)))
      ((>= i (length v1)))
      (begin
        (format p "~a ~a" (list-ref v1 i) (list-ref v3 i))
        (newline p)
      )
    )

    (newline p)
    (format p ")")
    (newline p)

    (close-input-port p)
    #t
  )
)

(hy-write-xyplot-file-2 "xyplot.xy"
 '(1 2 3 4 5 6 7) '(1 2 3 4 5 6 7) '(2 4 6 8 10 12 14) "xyplot" '("position" "velocity") '("A" "B"))

(xy-plot-file "xyplot.xy")


fluent 提供了一些可以修改的参数,包括文字标签,显示范围,符号等,GUI 中也可以进行操作。




评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值