流路の形を変えるたび、また設計図から?――生成AIとPythonでマイクロ流路の試作を効率化する

2026.10.30 未分類

LANGUAGE / 言語
RESEARCH / 研究成果

流路の形を変えるたび、また設計図から?
生成AIでマイクロ流路の試作を効率化する

小さな水路に液体を流し、混ぜたり分けたりする「マイクロ流路」。新しい装置を開発するときには、流路の幅や形を少しずつ変えて、何度も作り直す必要があります。問題は、そのたびに設計図を直し、3Dプリンタで製作し、寸法を確かめなければならないことです。

本研究の着眼点:設計図を速く作るだけでなく、実物を測って次の設計を改善する。

01 何が問題なのか? ―― 設計図と実物は簡単には一致しない

例えば、Y字に分かれる流路の幅を変えたいとします。CADで図面を修正し、3Dプリントして、顕微鏡で寸法を測ります。結果が狙いと違えば、また最初からやり直します。

問題 1 / 作図

一つの形を作るだけでも時間がかかる

606–799秒

今回調べた3種類の流路をAutoCADで手動作図したときの平均時間です。

問題 2 / 生成AI

最初から正しい形になるとは限らない

中実化・位置ずれ

初期のAI生成コードでは、水が通るはずの空間が埋まったり、分岐がずれたりしました。

問題 3 / 製作

CADが正しくても、印刷すると寸法がずれる

最大12.6%

3形状・2組の条件で製作した流路トラックの外形幅には、最大12.6%のずれがありました。

設計値は1,000 µm。完成品を測ると1,095.5 µm。

右の写真は、Y字流路のCADデータと3Dプリントした実物です。設計した流路トラックの外形幅は1,000 µm(1 mm)でしたが、造形後の平均値は1,095.5 µm。約9.6%広くなりました。

Y字流路の外形幅(補正前)
1,000 µm設計値 →1,095.5 µm実測値
論文Table II。流路内部の幅ではなく、流路トラック全体の外形幅の比較です。

どの段階でずれたのかを見つけ、次の試作を改善できないだろうか?

Y字流路のCADと造形物
Paper Fig. 6 — Y字流路のCAD設計とFDMで作った実物。手動CADによる形状との比較も掲載。

02 どう解決したのか? ―― ChatGPTでコードを作り、Pythonで何度も設計する

生成AIには、流路の形や寸法を伝えて設計用のPythonコードを書いてもらいます。そのコードを確認・修正して保存し、以後は流路幅や角度などの数字を変えるだけで図面を作り直します。

DESIGN → FABRICATE → MEASURE → IMPROVE
① ChatGPT流路を作るPythonコードを作成・修正
② PythonSVG・DXFの図面と3Dプリント用STLを生成
③ 製作・計測3Dプリンタで作り、顕微鏡で寸法を測る
↶ 測定で見つかった寸法のずれをPythonの設計値に戻し、再び作る

なぜPythonのコードを保存するのか?

同じ文章をChatGPTに入力しても、毎回同じコードが返るとは限りません。一方、確認済みのPythonコードを同じ条件で動かせば、同じ設計データを作れます。AIにはコードを書かせ、確定したコードで設計を繰り返す、という役割分担です。

ハッシュ値は「ファイルの指紋」。 確定したPythonコードを各形状で3回実行したところ、3回ともSTLファイルのMD5ハッシュ値が一致しました。つまり、同じ設計データが生成されたことを確認できました。

3種類の微小流路の設計形状
Paper Fig. 3 — Pythonから作成した3種類の流路(渦巻き、T字、Y字)。
スパイラル流路のCADと造形物
Paper Fig. 4 — 渦巻き流路のCAD形状と、FDM方式で造形した実物。

03 どれくらい速くなったのか? ―― 条件変更後の図面を数秒で出力

一度プログラムを完成させれば、幅、曲率半径、分岐角度、渦巻きの巻き数などを数字で指定して、別の設計条件をすばやく試せます。

流路形状確定したPythonコードの実行AutoCADの手動作図
Spiral mixer(渦巻き)0.80秒799秒
T-junction(T字)1.87秒606秒
Y-junction(Y字)4.32秒692秒

論文Table I。各形状につき3回測定した平均。Pythonは完成済みスクリプトの実行開始から図面・STLの出力完了まで、手動CADは作図開始からSTL出力完了までを測定しました。

CAD生成時間比較グラフ
Paper Fig. 7 — Pythonでの設計データ出力時間と、AutoCADによる手動作図時間の比較。

最初のコード作成にはChatGPTとのやり取りが必要で、対話による開発作業は合計約45~60分でした。完成後は、条件を変えるたびに一から作図する必要がなくなるため、複数条件の比較や繰り返し試作で効果を発揮します。

04 作った流路は狙った寸法だったのか? ―― 測定結果から補正する

図面ができても、完成品の寸法が合わなければ実験には使いにくくなります。そこで、設計データを確認したあと、FDM方式の3Dプリンタで製作した流路を顕微鏡で測定しました。

12.6%試験した流路の外形幅の最大偏差
3種類 × 2条件渦巻き、T字、Y字の設計を評価
10 µL/min試験した流路で目視による漏れがなかった流量
外形幅の比較グラフ
Paper Fig. 8 — 設計した流路トラックの外形幅と、造形後に測定した外形幅の比較。
高さの比較グラフ
Paper Fig. 9 — 設計した流路トラックの高さと、造形後に測定した高さの比較。

実際に測ることで、設計と造形の問題を切り分けた

まずSTLデータの寸法をMeshLabで確認し、指定した形状が出力されていることを調べました。その後、3Dプリントした流路の外形寸法をデジタルマイクロスコープで測定。ずれの主な発生場所が造形工程にあることを確認しました。

測定値を次の設計に戻すと、寸法のずれが小さくなった

流路形状補正1回目の外形幅偏差補正2回目の外形幅偏差
T字+7.60%+5.6%
Y字+8.57%+4.8%

論文Table IV。数値は補正1回目と2回目の比較です。3DプリンタはBambu Lab A1、材料はPLAを使用しました。

水を流す試験では、全デバイスで10 µL/minまで目視による漏れはありませんでした。漏れ始めた流量は渦巻き流路が15 µL/min、Y字が30 µL/min、T字が35 µL/minでした。形状が作れることに加え、実際に流れるかも確かめたことがポイントです。

この研究が実現したのは、設計図を繰り返し生成し、実物を作り、測定結果を次の設計に戻す、一連の試作工程です。

論文情報 / Publication

LLM-driven rapid prototyping of microfluidic devices: a deterministic Python-mediated framework for design, fabrication, and validation

M. A. N. Khatana, M. A. R. Shah, T. Shibata, S. Okamoto, T. S. Santra, M. Nagai

Rapid Prototyping Journal (2026), pp. 1–13

https://doi.org/10.1108/RPJ-03-2026-0148

掲載図:著者論文のFig. 3、4、6、7、8、9。数値は論文Table I–Vおよび本文に基づきます。

RESEARCH / PUBLICATION HIGHLIGHT

Redrawing a microchannel every time you change its shape?
Making microfluidic prototyping faster with generative AI

Microfluidic devices guide tiny amounts of liquid through narrow channels to mix, split, or direct a flow. Developing a new device means adjusting channel widths and shapes, then making and testing many prototypes. Each change can lead to another round of CAD drafting, 3D printing, and dimensional measurement.

Our idea: generate design files quickly, then use measurements of the physical device to improve the next design.

01 What makes prototyping difficult? — A CAD drawing and a printed device do not always match

Imagine changing the width of a Y-shaped channel. You revise the CAD model, print a new device, and inspect its dimensions under a microscope. When the result differs from the target, you repeat the cycle.

CHALLENGE 1 / DRAFTING

Even one geometry takes time to draw

606–799s

Mean manual AutoCAD drafting time for the three geometries tested in this study.

CHALLENGE 2 / AI

Initial AI-generated geometry can contain errors

Solid channels & misalignment

Early scripts produced solid interiors instead of hollow channels, or misaligned junctions.

CHALLENGE 3 / PRINTING

Correct CAD dimensions can still change during printing

Up to 12.6%

Maximum deviation in overall channel-track width across three geometries and two parameter sets.

Designed width: 1,000 µm. Measured after printing: 1,095.5 µm.

The figure on the right compares CAD models with fabricated Y-junction devices. The target overall channel-track width was 1,000 µm (1 mm). The mean printed width was 1,095.5 µm — approximately 9.6% wider.

Overall Y-junction track width, before correction
1,000 µmdesign →1,095.5 µmmeasured
Paper Table II. These values refer to the external channel-track width, not the internal flow-channel width.

Can we identify where the deviation occurs and use that information to improve the next prototype?

Y-junction CAD and fabricated devices
Paper Fig. 6 — Fig. 6 of the paper. CAD designs and FDM-printed Y-junction devices, including comparison with manual CAD.

02 Our approach — ChatGPT writes the code; Python generates repeatable CAD files

We give the language model the channel type and target dimensions, then use it to develop Python code. After checking and refining the code, we keep the finalized script and adjust numerical parameters such as width and angle to regenerate the design.

DESIGN → FABRICATE → MEASURE → IMPROVE
① ChatGPTDevelop and refine Python code for the channel geometry
② PythonExport SVG/DXF drawings and STL files for 3D printing
③ Print & measureFabricate the channel and measure it with a microscope
↶ Feed measured dimensional errors back into the Python parameters and make the next device

Why save and reuse the finalized Python script?

Identical prompts to ChatGPT can generate different code. A checked and finalized Python script, executed under the same conditions, generates the same design files. The LLM helps write the program; the fixed program reproduces the CAD geometry.

A hash is a file’s digital fingerprint. For each geometry, three executions of the finalized script yielded STL files with matching MD5 hashes. This confirmed that the design files were identical across repeated runs.

CAD layouts of three microfluidic channel geometries
Paper Fig. 3 — Fig. 3. Three channel geometries generated by Python: spiral mixer, T-junction, and Y-junction.
Spiral mixer CAD and fabricated device
Paper Fig. 4 — Fig. 4. CAD geometry and FDM-printed spiral mixer.

03 How much faster? — Regenerate a design in seconds

Once the script is ready, changes to channel width, curvature, junction angle, or spiral loop count can be entered as parameters. The updated CAD files are exported within seconds.

Channel geometryFinalized Python scriptManual AutoCAD drafting
Spiral mixer0.80 s799 s
T-junction1.87 s606 s
Y-junction4.32 s692 s

Paper Table I; mean of three runs per geometry. Python times cover execution of the finalized script through file export. Manual CAD times cover drafting through STL export.

Chart comparing CAD generation times
Paper Fig. 7 — Fig. 7. CAD export time using the finalized Python script versus manual AutoCAD drafting time.

Developing the initial script took approximately 45–60 minutes of interactive work with ChatGPT. Once created, that script eliminates the need to redraw every variation from scratch, making it especially useful when comparing many design conditions or repeating fabrication cycles.

04 Did the printed channels meet the target dimensions? — Measure, then correct

A fast CAD model is useful only when the manufactured device can be evaluated against its target. We verified the digital geometry, fabricated channels by fused deposition modelling (FDM), and measured the printed devices using digital microscopy.

12.6%Maximum deviation in overall channel-track width
3 × 2Three geometries and two parameter sets
10 µL/minNo visible leakage at or below this flow rate in the tested devices
Chart comparing channel track widths
Paper Fig. 8 — Fig. 8. Designed versus measured overall channel-track widths after fabrication.
Chart comparing channel track heights
Paper Fig. 9 — Fig. 9. Designed versus measured channel-track heights after fabrication.

Measurements separate geometry generation from printing errors

We first checked the STL dimensions in MeshLab, then measured the fabricated channel-track dimensions under a digital microscope. This comparison showed that the dimensional deviations arose primarily during FDM fabrication.

Using measurements to update the next CAD design reduced width deviations

Channel geometry1st compensated iteration2nd compensated iteration
T-junction+7.60%+5.6%
Y-junction+8.57%+4.8%

Paper Table IV. These values compare the first and second compensated iterations. Devices were fabricated using PLA on a Bambu Lab A1 printer.

Flow testing showed no visible leakage up to 10 µL/min. Leakage began at 15 µL/min for the spiral mixer, 30 µL/min for the Y-junction, and 35 µL/min for the T-junction. The study tested not only whether the geometry could be generated, but also whether the printed channels carried fluid.

The outcome is a repeatable prototyping workflow: generate CAD, fabricate a device, measure the result, and use that measurement to improve the next design.

Publication / 論文情報

LLM-driven rapid prototyping of microfluidic devices: a deterministic Python-mediated framework for design, fabrication, and validation

M. A. N. Khatana, M. A. R. Shah, T. Shibata, S. Okamoto, T. S. Santra, M. Nagai

Rapid Prototyping Journal (2026), pp. 1–13

https://doi.org/10.1108/RPJ-03-2026-0148

Figures reproduced from the authors’ paper: Figs. 3, 4, 6, 7, 8, and 9. Values and explanations are based on Tables I–V and the main text.


HP改訂・研究室見学案内の充実

2026.10.13 未分類


研究室HPの案内情報を更新

2026.04.07 未分類


香川・金比羅山、785段の石段を制覇!Conquered 785 stone steps at Konpira-san, Kagawa! 🥾

2025.04.11 未分類

香川・金比羅山、785段の石段を制覇!🥾

左は活気ある参道、まるで山のショッピングモール🍡

右は満開の桜と…花粉と戦う私です🤧

この顔、疲れではなくて、花粉にやられているだけなんです!(笑)

春のこんぴら参りは、鼻水が大量に出ましたが、達成感と景色が格別でした🌸

Conquered 785 stone steps at Konpira-san, Kagawa! 🥾

Left: The lively approach path feels like a mountainside shopping mall 🍡

Right: Beautiful cherry blossoms & me deep in battle with hay fever 🤧

Don’t be fooled, the face is serious pollen suffering, not fatigue! (lol)

Spring visit = runny nose, but the sense of accomplishment & stunning views were exceptional! 🌸


学術雑誌の編集長は部長と類似?Academic Editor: Like Being a Club Captain?

2025.04.10 未分類

2024年度、学術論文雑誌の編集長として100報弱の論文を管理しました📚エディタや査読者は全て無報酬の業務で、それでも協力してくれた方々に感謝🙏私も無報酬です。

これを例えると部活の部長ですかね。もちろんこういう仕事は、好きだから回ってくるんでしょうね😅

論文数の確保や時間管理には、反省点もあります。それでも無事任期を終え、愛媛の蛇口から出るみかんジュースで補給🚰🍊🥤ほっとしています🥳

In fiscal year 2024, as the editor-in-chief of an academic journal, I managed just under 100 papers 📚. All editors and reviewers worked without compensation, and I’m grateful to everyone who cooperated 🙏. I was also unpaid.

To use an analogy, it’s like being a club captain. Of course, this kind of job probably comes to you because you enjoy it 😅.

There are some points for reflection regarding securing enough papers and time management. Nevertheless, I safely completed my term and refreshed myself with MIKAN (mandarin orange) juice from Ehime’s famous orange juice taps 🚰🍊🥤, feeling relieved 🥳.


ドラクエの聖地、堀井雄二の出身地洲本市を訪問Visiting Sumoto City: The Sacred Ground of Dragon Quest and Birthplace of Yuji Horii

2025.04.09 未分類

子供のときにドラクエやRPGには熱中しましたね。四国への旅行では、途中、そのゲームデザイナである堀井雄二の出身地(兵庫県洲本市)にも行きました🤩車だと淡路島にも簡単に行けました🚗

ロトの剣と盾、スライムの記念碑、「そして伝説へ…」と刻まれた石碑で勇者になります。洲本には観光客があまりおらず、静かに聖地巡礼ができました😎この街、もっとドラクエで売り出せそうですね。

色々と四国の城も見て周りましたが、私にはドラクエの方が歴史の人物より身近です。堀井雄二は早稲田の文学部出身なのですね。物語を作れる人は強く、文学は実学だと思っています(法学や経済学の方がより実学ですが)✍️文学の力は目に見えにくいけれど、現に私が呼び込まれてしまってますしね 😊

I was really into Dragon Quest and RPGs as a child. During my trip to Shikoku, I also visited Sumoto City in Hyogo Prefecture, the hometown of game designer Yuji Horii🤩 By car, I could easily get to Awaji Island too🚗

I became a hero with Loto’s sword and shield, the Slime monument, and the stone monument inscribed with “And into legend…”. There weren’t many tourists in Sumoto, so I could enjoy a quiet pilgrimage to this sacred site😎 This town could promote itself more through Dragon Quest, don’t you think?

I visited various castles around Shikoku, but Dragon Quest feels more familiar to me than historical figures. I learned that Yuji Horii graduated from Waseda University’s literature department. People who can create stories have great power, and I believe literature has practical value (though law and economics are considered more practical)✍️. The power of literature may not be visible, but it clearly drew me here myself😊


高知訪問:坂本龍馬はタイミングを図ってたのかあKochi Visit: Was Sakamoto Ryoma calculating his timing?

2025.04.08 未分類


高知(土佐)の坂本龍馬の記念館も行きました⚔️ 歴史に名が残ってるのはなぜ?

時代の先を行きつつ、狙っていい目を出してるからとも言えますよね🎲彼は我慢強く、動くタイミングを見てたというのが発見でした👀徳川家康にも見た特徴です。

歴史上の人物でも、研究と同じだな。両方に通じる😉

I visited Sakamoto Ryoma’s memorial in Kochi (Tosa) ⚔️ Why does he remain famous in history?

Perhaps because he was ahead of his time while also rolling good dice with his timing 🎲 I discovered that he was patient and watched for the right moment to act 👀 A trait I also saw in Tokugawa Ieyasu.

Even historical figures share principles with research. Both worlds connect 😉


ビジネスではあまり行く機会がない四国へ旅行Trip to Shikoku, a place I rarely visit for business

2025.04.07 未分類

5日間も休みを取って、四国4県を巡っていたのです🚗レンタカーで各都市を移動したことから、ドライバーである私に投稿する余裕はありませんでした。

分かりやすいのは、愛媛県松山市にある道後温泉で、雰囲気ありました♨️休みには、ビジネスでは行かない所に行くのがいいですね😌

I took 5 days off and traveled around all 4 prefectures of Shikoku 🚗. Since I was driving a rental car between cities, I didn’t have time to post updates as the driver.

The most notable spot was Dogo Onsen in Matsuyama City, Ehime Prefecture, which had a wonderful atmosphere ♨️. It’s great to visit places during your time off that you don’t typically go to for business 😌


昭和の食堂ってこんなだったよなあThis is what Showa-era diners used to be like

2025.03.31 未分類

日曜日の昼🍴工学研究者として普段はオリジナルを追求する毎日ですが、休日は息子とチャレンジャーな食探しも楽しみです。行ったことがない店に行きました。

うーん、安い😮時間がストップしていて、間違えて値付けしているような💰私はチャーシュー麺と野菜炒めを注文。ここは昭和の映画セットとして保存したいですね🪑🥹

Sunday lunchtime 🍴 As an engineering researcher who pursues originality during the week, I also enjoy exploring new places with my son on weekends. We visited a restaurant we’ve never been to before.

Wow, it’s so cheap 😮 It’s like time has stopped here, as if they’ve made a mistake with their pricing 💰 I ordered chashu ramen and stir-fried vegetables. This place should be preserved as a Showa-era movie set 🪑🥹


+観光で外ランニングを継続しますKeep Running Outdoors with Sightseeing

2025.03.30 未分類

毎日走る行為は変わらないけれど、飽きないのはなぜ?スローペースで走れば、四季折々の景色や人々の移ろいがよく分かる🌞

吉田城や柳生川沿いも桜に囲まれると、普段よりも華やかで特別感がある🌸🏯春の陽気の中、散策を楽しむ人々を見るのも好きだ🥰外ランニング+観光にすると、続けやすいよね💮

Why doesn’t running every day get boring? Running at a slow pace allows you to fully enjoy the seasonal scenery and observe the changes in people 🌞.

When Yoshida Castle and the Yanagi River are surrounded by cherry blossoms, they feel more vibrant and special 🌸🏯. I love watching people enjoying their strolls in the spring sunshine 🥰. Combining outdoor running with sightseeing makes it easier to keep going 💮.


豊橋技術科学大学

機械工学系

機械工学系 マイクロ・ナノ機械システム研究室

国立大学法人 豊橋技術科学大学

ハイスループットマイクロ・ナノ工学研究室

〒441-8580 愛知県豊橋市天伯町雲雀ヶ丘1-1

E-mail: web-info@hmn.me.tut.ac.jp

Copyright © 豊橋技術科学大学 ハイスループットマイクロ・ナノ工学研究室