Math & Numbers
Расчёт перепада давления на трение по Дарси-Вейсбаху для прямой трубы: ΔP=f·(L/D)·(ρ·v²/2) Па; потеря напора h_f=ΔP/(ρ·g)=f·(L/D)·v²/(2g) м. Пользователь вводит коэффициент трения Дарси f (не Фаннинга). Единицы: длина — м/км/фт, диаметр — м/см/мм/дюйм, плотность — кг/м³/г/см³/фунт/фут³ (приводится к СИ). Выводятся кПа, бар и напор в м/фт.
Вызовите этот инструмент из своего кода на трёх языках.
curl -X POST 'https://api.elysiatools.com/ru/api/tools/pipe-pressure-drop-darcy' \
-H 'Content-Type: application/json' \
-d '{"frictionFactor":0.02,"pipeLength":100,"pipeLengthUnit":"m","diameter":0.05,"diameterUnit":"m","density":1000,"densityUnit":"kg/m³","velocity":2,"gravity":9.81,"decimalPlaces":4}'Отправьте POST-запрос с входными данными в JSON. Параметры типа «файл» требуют предварительной загрузки.
POST https://api.elysiatools.com/ru/api/tools/pipe-pressure-drop-darcy| Имя | Тип | Обязательный | Описание |
|---|---|---|---|
| frictionFactor | number | Да | Darcy friction factor f (also called Moody / Darcy-Weisbach factor). NOTE: this is NOT the Fanning friction factor (f_Darcy = 4·f_Fanning). Obtain f from a Moody chart or the Colebrook-White correlation. |
| pipeLength | number | Да | Pipe length L in the selected Length Unit. |
| pipeLengthUnit | select | Нет | — |
| diameter | number | Да | Internal pipe diameter D in the selected Diameter Unit. |
| diameterUnit |
Добавьте этот инструмент на свой сервер Model Context Protocol, чтобы ИИ-агенты могли перечислять и вызывать его.
Добавьте этот блок в конфигурацию вашего MCP-клиента:
{
"mcpServers": {
"elysiatools-pipe-pressure-drop-darcy": {
"name": "pipe-pressure-drop-darcy",
"description": "Расчёт перепада давления на трение по Дарси-Вейсбаху для прямой трубы: ΔP=f·(L/D)·(ρ·v²/2) Па; потеря напора h_f=ΔP/(ρ·g)=f·(L/D)·v²/(2g) м. Пользователь вводит коэффициент трения Дарси f (не Фаннинга). Единицы: длина — м/км/фт, диаметр — м/см/мм/дюйм, плотность — кг/м³/г/см³/фунт/фут³ (приводится к СИ). Выводятся кПа, бар и напор в м/фт.",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=pipe-pressure-drop-darcy",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}После подключения к SSE-endpoint выведите список доступных инструментов:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}Вызовите инструмент по его id; аргументы формируются из его параметров:
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "pipe-pressure-drop-darcy",
"arguments": {
"frictionFactor": 0.02,
"pipeLength": 100,
"pipeLengthUnit": "m",
"diameter": 0.05,
"diameterUnit": "m",
"density": 1000,
"densityUnit": "kg/m³",
"velocity": 2,
"gravity": 9.81,
"decimalPlaces": 4
}
}
}| select |
| Нет |
| — |
| density | number | Нет | Fluid density ρ in the selected Density Unit. |
| densityUnit | select | Нет | — |
| velocity | number | Да | Mean flow velocity v in m/s. |
| gravity | number | Нет | Gravitational acceleration g in m/s². Default 9.81 (Earth); override for non-Earth or unit-head conversions. |
| decimalPlaces | number | Нет | — |
JSON-результат
{
"key": {...},
"metadata": {
"key": "value"
},
"error": "Error message (optional)",
"message": "Notification message (optional)"
}Вопросы или проблемы? Свяжитесь с [email protected]